Conversation
Greptile SummaryThis PR makes two targeted service-layer fixes: it replaces generic Confidence Score: 5/5Safe to merge — all findings are P2 style suggestions with no blocking issues. Changes are small, well-tested, and strictly improvements: a domain exception swap and a null-guard. No logic regressions or data-integrity concerns were found. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant ReplayService
participant StorageQuotaService
participant S3StorageService
participant ReplayMongoRepository
Client->>ReplayService: initUpload(server, mcVersion, fileSize)
alt fileSize > maxFileSize
ReplayService-->>Client: throws ValidationException("File size exceeds maximum of N MB")
else quota exceeded
ReplayService->>StorageQuotaService: canUpload(server, fileSize)
StorageQuotaService-->>ReplayService: false
ReplayService-->>Client: throws ValidationException("Storage quota exceeded")
else valid
ReplayService->>StorageQuotaService: canUpload(server, fileSize)
StorageQuotaService-->>ReplayService: true
ReplayService->>S3StorageService: createPresignedUploadUrl(...)
S3StorageService-->>ReplayService: PresignUploadResponse
ReplayService->>ReplayMongoRepository: saveEntity(server, doc)
ReplayService-->>Client: InitReplayUploadResponse
end
|
cool shi