Fix upload quota check and provide better error message (#893)
* Adjusted upload quota check to include file size and show proper error message Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Fixed failing upload quota tests Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Moved quota check to stream, fixed review findings Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added missing license header to QuotaInputStream Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Reworked uploadLock, ensured error messages may be translated, review fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added local artifactrepo to gitignore Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Fixed sonar issues and assignment quota message Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * PR review fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Split quota exceptions, PR fixes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Removed left over conversion method in quota helper Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Made conversion helper class final Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
9b8ab40c55
commit
09f2d8a481
@@ -61,6 +61,8 @@ public class ResponseExceptionHandler {
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_ARTIFACT_DELETE_FAILED, HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_ARTIFACT_LOAD_FAILED, HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_QUOTA_EXCEEDED, HttpStatus.FORBIDDEN);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_FILE_SIZE_QUOTA_EXCEEDED, HttpStatus.FORBIDDEN);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_STORAGE_QUOTA_EXCEEDED, HttpStatus.FORBIDDEN);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_ACTION_NOT_CANCELABLE, HttpStatus.METHOD_NOT_ALLOWED);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_ACTION_NOT_FORCE_QUITABLE, HttpStatus.METHOD_NOT_ALLOWED);
|
||||
ERROR_TO_HTTP_STATUS.put(SpServerError.SP_DS_CREATION_FAILED_MISSING_MODULE, HttpStatus.BAD_REQUEST);
|
||||
|
||||
Reference in New Issue
Block a user