Fixed status codes returned by the resource server in failure cases.
Now we return 401 (Unauthorized) if authentication token is invalid and 500 (Internal error) if there happened any error non-related to the user's input, e.g. when encoding the server response into json.
Previously 400 (Bad request) was returned in all the cases.
Description
Fixed status codes returned by the resource server in failure cases. Now we return 401 (Unauthorized) if authentication token is invalid and 500 (Internal error) if there happened any error non-related to the user's input, e.g. when encoding the server response into json. Previously 400 (Bad request) was returned in all the cases.
Test Cases Checklist
SECTION 1: RESOURCE SERVER (http://localhost:5001/)
SECTION 2: WE'VE GOT POEMS (http://localhost:5173/)
SECTION 3: IMSHARER (http://localhost:5174/)