Add docs link to LXD server errors

Bug #1928621 reported by Huw Wilkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Low
Unassigned
3.0
Won't Fix
Undecided
Unassigned
maas-ui
Triaged
Low
Unassigned

Bug Description

When the API responds with a server error e.g. "Cannot connect to LXD server." it should also contain a link to the docs e.g. "Cannot connect to LXD server. Try again or [find out more]" which would link to:

https://discourse.maas.io/t/kvm-server-errror/4569

You can see an example here:

https://app.zeplin.io/project/601454d5d1141e1b6ea271b7/screen/602ace6e61571123cd68b0fa

Revision history for this message
Alberto Donato (ack) wrote :

I don't think we should include links directly in error messages from the backend.

These errors can also appear from API calls, which means the caller would get an HTML snippet in the text.
Also note that we're not always in control of the error message we display, in the specific case the error might come from LXD, and MAAS just pushes it up.

Couldn't the UI just add the link text when an error is displayed from the connect form?

Changed in maas:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Huw Wilkins (huwshimi) wrote :

I think the UI has the same issue of not know what the error is related to, but maybe it's fine to have the link for any error. Caleb, any thoughts about that?

Alberto, we have links come from the API for other errors/notifications. Do we need to think about changing them as well if they're resulting in html appearing in the console?

Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

I agree it's an odd pattern sending an HTML snippet from the API. We should probably change any errors and notifications that currently do the same thing.

For now I think it's fine to just show the same link for any error that happens when connecting to a LXD server fails. We'll have to special case the Add KVM form for now, but maybe in the future it would be good to be able to associate a link with any action.

Huw Wilkins (huwshimi)
tags: added: ui
Changed in maas-ui:
importance: Undecided → Unknown
Changed in maas:
milestone: 3.0.1 → none
Changed in maas-ui:
milestone: none → 3.5.0
Changed in maas:
milestone: none → 3.5.0
Changed in maas-ui:
importance: Unknown → Low
Changed in maas:
importance: Medium → Low
Changed in maas-ui:
status: New → Triaged
tags: removed: ui
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.