[MGNLREST-572] When delivery endpoint not found, return 404 in json, not the full loginscreen. Created: 09/Nov/22  Updated: 08/Feb/24

Status: In Progress
Project: Magnolia REST Framework
Component/s: None
Affects Version/s: 2.2.15
Fix Version/s: 3.0.0, 2.2.25

Type: Improvement Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Robert Šiška
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by PAGES-1575 Remove explicit ACL for template endp... In Progress
relation
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: Support
Team: DeveloperX
Work Started:

 Description   

As a developer it would be more useful and pleasant to get a simple response when I incorrectly access a route that does not exist.

To reproduce:

Enter a delivery endpoint url - but misspel the naame of the endpoint, for example: 
`https://delivery-preview.saas.magnolia-cloud.com/delivery/badname/`

or

`https://mymag.com/.rest/

Expected:

A simple json response with an error message, something about 404, please check your url.

Actual:

It returns the Magnolia login screen.

Notes:

If the url is correct up to the /.rest or is correct SaaS format, then recognize that it is a rest request.  

Why:

Its confusing to get the HTML of the login page as the response.

 


Generated at Mon Feb 12 07:01:09 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.