JesseMattson / PurrgentCare

0 stars 0 forks source link

Bug: Status codes being returned do not follow standard practices #40

Closed RandallKeur closed 3 months ago

RandallKeur commented 3 months ago

Issue: Currently, all controllers return 200s for successful api calls. Restful protocols call for different 200 codes depending on the result. Status codes: 200 - GET requests & PUT requests that return the resource 201 - POST requests 204 - DELETE requests & PUT requests that do not return the resource See article for reference.

Technical Details:

Acceptance Criteria:

RandallKeur commented 3 months ago

Recommended approach will leverage the @ResponseStatus annotation. Some light reading: https://www.baeldung.com/spring-response-status An example PR to start with: https://github.com/JesseMattson/PurrgentCare/pull/41