[MGNLREST-79] Provide error messages for REST calls that return a client error message Created: 30/Sep/16 Updated: 23/Oct/23 Resolved: 01/Mar/22 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | services |
| Affects Version/s: | 1.1.1 |
| Fix Version/s: | 2.2.12 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Nils Breunese | Assignee: | Chuong Doan Huy |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 2d 2.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Headless Phase 2 | ||||||||
| Sprint: | DevX 4 | ||||||||
| Story Points: | 3 | ||||||||
| Description |
|
Currently for instance PUT calls to /.rest/workspace/path return 400 Bad Request for all of the following error conditions:
However, a client can't differentiate between these conditions and display a meaningful error message, because all that is returned is a 400 Bad Request. I'd like to suggest returning an error message when an error is sent, which will make it easier to troubleshoot calls that return an error status code and also will allow client builders to provide a better experience by being able to show a specific error message to the user when something doesn't work. |
| Comments |
| Comment by Christopher Chard [ 21/Aug/20 ] |
|
+1 for this. Currently, the API feels a bit ... worthless as I have no idea what I'm doing wrong when PUTting and POSTing |
| Comment by Richard Gange [ 24/Aug/20 ] |
|
While I understand the frustration with the REST API we do have examples in our documentation. Please see https://documentation.magnolia-cms.com/display/DOCS/REST+API. I agree that it would be super helpful if the API told you exactly what you did wrong it all of these cases it would take us a lot of effort to craft the endpoint in such a way that reading the docs would be obsolete. If you are having trouble with getting it working then:
|