globe-and-citizen / layer8

This repo contains the Layer8 Resource/Authentication Server, Proxy, and Service Provider Mocks
GNU General Public License v2.0
1 stars 2 forks source link

fixed the returned status codes #132

Closed interestIngc closed 2 months ago

interestIngc commented 2 months ago

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/)