[MGNLRESTUI-5] UI should fail gracefully when Rest Datasource is offline Created: 03/Oct/19  Updated: 20/Aug/21  Resolved: 11/Dec/19

Status: Closed
Project: Magnolia REST Client UI
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Quach Hao Thien
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 3d 1h
Original Estimate: Not Specified

Attachments: PNG File connection-refused.png    
Issue Links:
Problem/Incident
causes MGNLRESTUI-7 BrowserSubapp, Select & Chooser shoul... Closed
dependency
depends upon MGNLRESTCL-43 Handle errors in a REST response Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: Declarative REST clients
Sprint: Declarative REST 12
Story Points: 5

 Description   

As an AdminCentral user, I don't want to get giant red bars with cryptic exception errors when a connected REST endpoint is not available, because it scares me and does not help me understand why AdminCentral is not working.

Currently if a REST endpoint is not available an exception is thrown resulting in a big red error bar. This is at least true in a browser app, and is probably true in Select and Link fields or anywhere a REST datasource is used (Search results supplier?). (To verify)

UI elements that can have a REST Datasource should be able to gracefully handle the endpoint being unavailable. Probably showing a clear message where the content would normally be displayed - in the App, in the Chooser, in the Select field, etc. Something like "Content not available. Please try again later. If this problem persists contact your system administrator."

 

Maybe this needs to be solved in each UI element? Or maybe the REST Datasource can return a fake content item with the "Content service is not available" message.



 Comments   
Comment by Quach Hao Thien [ 06/Dec/19 ]

czimmermann

to the idea displaying the fake content "Content service is not available" in UI component, it cannot be handled from REST datasource, since the ui component has been configured before data are fetched, if data's structure is not mapped with the component's structure, exception will happen.

Therefore I think this should be solved in each UI component not from datasource. Every component which has datasource (not only Rest Datasource) should have a default row (row for Grid, or item for Select) or any fallback solution to notify "Data is not available".

Comment by Christopher Zimmermann [ 09/Dec/19 ]

OK - thanks for the feedback.
What do you think can be covered in the scope of this ticket?
Do you think we need a new ticket for each UI element?
Or how do you advise to proceed?

Comment by Quach Hao Thien [ 10/Dec/19 ]

"Data is not available" not only caused by JsonDatasource but also other Datasource, and this relates to behavior of each element, I think you should create separate tickets for each UI elements

Comment by Christopher Zimmermann [ 11/Dec/19 ]

Please add a comment to the ticket describing what has been implemented.

Comment by Quach Hao Thien [ 12/Dec/19 ]

for QA:

Any exception during REST datasource fetching will not appear on Banner of apps, but only be printed on LOG.

Comment by Christopher Zimmermann [ 12/Dec/19 ]

Thanks

Generated at Mon Feb 12 06:50:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.