FordLabs / retroquest

DEPRECATED ⛔️: RetroQuest is a website that enables teams to run retrospectives online.
Apache License 2.0
56 stars 37 forks source link

Move error messages from status 'reason' to response body as per HTTP… #519

Closed sapphon closed 9 months ago

sapphon commented 1 year ago

Overview

This PR changes the way RetroQuest's API reports errors.

Previously, RetroQuest API placed error details in the reason field of the HTTP status object transmitted as part of the response to the failed request. This is off-spec behavior, but more importantly: many browsers and other tools discard status reasons, as they are redundant - they should always correspond to the status code. 404 is always "Not Found", 409 is always "Conflict", etc. These are not meant to change per application!

After this PR is applied, RetroQuest will put error messages in the body of the response, under the reason field.

Testing Instructions

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication