Closed flyingluscas closed 7 years ago
@flyingluscas one quick question: returning a 500 error when the user is not authenticated is the best way? To my knowledge 500 errors are server errors.
@vedovelli good point, I'm checking if is a HttpException to use the appropriate status code, but the AuthenticationException doesn't use the HttpException, let me see how I can fix this here ok
@vedovelli ok, I've made some alterations, tested and it seems ok now, but I dont like the size of method handleExceptionJsonResponse, what do you think?
@flyingluscas I'm OK with the method size. But I think it deserves comments to explain each block. Remember this application is also a source of knowledge. Thanks!
@vedovelli Right, sorry, I'll get right on that :)
Thanks a lot!
No, thank you sir, from now on I'll comment more my code :D
Handling all exceptions with a JSON response, that way the controller doesn't have to use try catch on every method.