48080[BUGFIX] Catch exceptions while dumping a file
Commit message
Review
-
Code review CR +2
- Frans Saris +2
- Stefan Neufeind +1
- Markus Klein +1
- Andreas Kienast +1
-
Verified V +2
- Frans Saris +2
- Markus Klein +1
Issues 1
Files 1
Review log 27
Show 2 earlier messages
-
Wouter Wolters uploaded patch set 2 05/11/16, 14:30
-
Wouter Wolters uploaded patch set 3 05/11/16, 14:34
-
Wouter Wolters voted on patch set 3 CR 0 05/11/16, 14:35
-
Frans Saris voted on patch set 3 CR +1 05/11/16, 14:36
-
Markus Klein voted on patch set 3 CR +1 05/11/16, 14:37
-
Markus Klein updated the commit message in patch set 4 05/11/16, 14:37
-
Markus Klein voted on patch set 4 CR +1 05/11/16, 14:37
-
Mathias Brodala commented on patch set 4 05/11/16, 14:47
FileDumpController.php:65Should we log this exception instead of silently dropping it? -
Andreas Kienast voted on patch set 4 CR +1 05/18/16, 12:44
-
Markus Klein commented on patch set 4 05/18/16, 12:44
FileDumpController.php:65ReplyIn this case I would not log anything. The caller receives a 404 that should be enough -
Tymoteusz Motylewski commented on patch set 4 05/18/16, 12:44
FileDumpController.php:65Reply+1 for logging -
Markus Klein voted on patch set 4 V +1 05/18/16, 12:44
-
Wouter Wolters commented on patch set 4 05/18/16, 12:45
IMO no logging, we do not log other 404 do we? -
Markus Klein commented on patch set 4 05/18/16, 12:46
FileDumpController.php:65ReplyYour log will be spammed if the filerecord is gone, but still a valid link is around somewhere. -
Helmut Hummel commented on patch set 4 05/18/16, 12:46
what exceptions are we talking about anyway? Why should the be caught? what is wrong with a 500 status? -
Helmut Hummel commented on patch set 4 05/18/16, 12:48
FileDumpController.php:65ReplyI'd rather catch a filedoesnotexistexception (if that exists) than just any exception which might be appropriate to be thrown -
Helmut Hummel commented on patch set 4 CR -1 05/18/16, 12:50
FileDumpController.php:65Replyin fact Exception\FileDoesNotExistException is thrown in ResourceFactory::getInstance, thus we should only catch this and then a 404 header (without logging) makes indeed sense -
Wouter Wolters commented on patch set 4 05/18/16, 13:04
FileDumpController.php:65ReplySee the hisotry of the patch please. I discussed this with Frans and changed the patch accordingly. I do not want any 500 exception shown to a website user. Thats why all exceptions are catched here no matter what exception is thrown. -
Helmut Hummel commented on patch set 4 CR 0 11/04/16, 12:32
There are 3 point of views here: 1. from a user's point of view getting a 404 in any case seems good enough 2. from an application developers point of view hiding an error case (e.g. an exception in a driver) could mean hours of additional debugging because the error would be hidden with this commit 3. from an architectural point of view, it is wrong to emit a 404, if a resource is only temporarily not available. 404 means gone while 503 might be more appropriate depending on the reason But maybe in practice it might not harm to just throw a 404 and be done -
Markus Klein commented on patch set 4 11/04/16, 17:12
@Helmut: 404 does not mean "gone", this is 410. 404 is defined as: "The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible." So this seems perfectly fine to me. Developer's view: Log an exception for the developer. But the question is, whether requesting arbitrary files is really a reason to log each request. -
Stefan Neufeind voted on patch set 4 CR +1 11/13/16, 12:50
-
Frans Saris voted on patch set 4 CR +1 V +1 11/15/16, 11:52
-
Frans Saris voted on patch set 4 CR +2 V +2 11/15/16, 15:31
-
Gerrit merged patch set 4 11/15/16, 15:31
-
Frans Saris commented on patch set 5 11/15/16, 15:32
Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit d65da0cc3b19b70fe4a5677bec782e48a17450c0