View Issue Details

IDProjectCategoryView StatusLast Update
0005960libeufinsandboxpublic2020-07-09 19:38
ReporterMarcello Stanisci Assigned ToFlorian Dold  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0005960: All exceptions lead to "500 Internal server error"
DescriptionEven if the client POSTs invalid data, they get a "500 Internal server error" response.

This happens since now there is only one default exceptions handler that catches *all*
exceptions and respond with 500. Eventually, any exception should be managed according
to the context it originates from.
TagsNo tags attached.


Marcello Stanisci

2020-05-15 19:28

reporter   ~0015919

Last edited: 2020-07-09 19:31

Exceptions are now organized into three sections: NexusError, SandboxError, and UtilError.
Each type accepts a HTTP status code and a hint message to show to the user. Therefore this
bug doesn't really apply anymore.

BUT: because Gson doesn't throw any exception when a non-nullable field was missing in the
uploaded JSON and such field *are* tried to be accessed along the code, then an invalid JSON
POSTed can *still* lead the Sandbox (and the Nexus) to respond with 500 (due to the NPEs that
inevitably result by accessing those problematic null-fields.)

Marcello Stanisci

2020-05-15 19:35

reporter   ~0015921

Must correct the previous comment: although the SandboxError type was created, the Sandbox never
picks the details from it and rather respond with "500 Internal Server Error".


2020-07-09 19:38

manager   ~0016438

Such commit aee99f3e1a4fd38dbf2fa352b112ce9d08c0566c defines responses with a error description, and a HTTP status code (other than the default 500). *if* 500 is returned, then either the server reached a fatal state or one less severe error wasn't properly caught and managed.

Issue History

Date Modified Username Field Change
2019-11-06 11:12 Marcello Stanisci New Issue
2019-11-06 11:12 Marcello Stanisci Assigned To => Florian Dold
2019-11-06 11:12 Marcello Stanisci Status new => assigned
2020-05-15 19:28 Marcello Stanisci Note Added: 0015919
2020-05-15 19:30 Marcello Stanisci Status assigned => acknowledged
2020-05-15 19:30 Marcello Stanisci Relationship added related to 0006004
2020-05-15 19:30 Marcello Stanisci Relationship deleted related to 0006004
2020-05-15 19:30 Marcello Stanisci Relationship added child of 0006064
2020-05-15 19:35 Marcello Stanisci Note Added: 0015921
2020-06-18 22:06 Florian Dold Relationship deleted child of 0006064
2020-07-09 19:31 MS Note Edited: 0015919
2020-07-09 19:38 MS Status acknowledged => resolved
2020-07-09 19:38 MS Resolution open => fixed
2020-07-09 19:38 MS Note Added: 0016438