stable

Clone or download

Read-only

Exception code should not be always the HTTP status code

No functional changes. Exceptions that use an HTTP status code as exception are expected to implements the new interface `CodeIsAValidHTTPStatus`. Else the status code will be 500. request #19245: FrontRouter should not return blindly exception code as HTTP status code Change-Id: Ida64710922ff0cd364e3189e8b8fb1c7244c1f51

Modified Files

Name
M plugins/git/include/GitActions.class.php +6 −6 Go to diff View file
M plugins/git/include/GitPHP/MessageException.php +2 −1 Go to diff View file
M plugins/git/include/exceptions/GitRepoNotFoundException.class.php +5 −2 Go to diff View file
M plugins/git/include/exceptions/GitRepoNotInProjectException.class.php +5 −2 Go to diff View file
M plugins/git/include/exceptions/GitRepoNotOnGerritException.class.php +5 −2 Go to diff View file
M plugins/git/include/exceptions/GitUserNotAdminException.class.php +5 −2 Go to diff View file
M plugins/git/include/exceptions/ProjectNotFoundException.class.php +5 −1 Go to diff View file
M plugins/git/include/exceptions/TemplateNotInProjectNotInHierarchyException.php +5 −1 Go to diff View file
M plugins/gitlfs/include/Batch/Request/IncorrectlyFormattedBatchRequestException.php +2 −1 Go to diff View file
M plugins/gitlfs/include/Batch/Response/MaxFileSizeException.php +2 −1 Go to diff View file
M plugins/gitlfs/include/Batch/Response/ProjectQuotaExceededException.php +2 −1 Go to diff View file
M plugins/gitlfs/include/LFSJSONHTTPDispatchable.php +2 −1 Go to diff View file
M plugins/gitlfs/include/Lock/Request/IncorrectlyFormattedReferenceRequestException.php +2 −1 Go to diff View file
M plugins/gitlfs/include/Transfer/Basic/LFSBasicTransferObjectOutOfBoundSizeException.php +3 −1 Go to diff View file
M plugins/gitlfs/include/Transfer/Basic/ReadTooMuchDataException.php +2 −1 Go to diff View file
A src/common/Request/CodeIsAValidHTTPStatus.php +27 −0 Go to diff View file
M src/common/Request/ForbiddenException.php +1 −1 Go to diff View file
M src/common/Request/FrontRouter.php +2 −2 Go to diff View file
A src/common/Request/NotAcceptableException.php +31 −0 Go to diff View file
M src/common/Request/NotFoundException.php +1 −1 Go to diff View file
A src/common/Request/UnsupportedMethodException.php +31 −0 Go to diff View file
M src/common/Tus/CannotReadIncomingFileException.php +3 −1 Go to diff View file
M src/common/Tus/CannotWriteFileException.php +3 −1 Go to diff View file
M src/common/Tus/TusServerIncompatibleVersionException.php +3 −1 Go to diff View file
M tests/unit/common/Request/FrontRouterTest.php +100 −0 Go to diff View file