Actions
Bug #29385
openerrors when submitting bad facts are not helpful
Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Description
Ohai, when submitting facts for a host via /api/hosts/facts, one can easily end up in 500 errors, without any good explanation.
On the client you only see:
"error": { "message": "Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs." }
And in production.log:
2020-03-20T10:07:58 [I|app|0808e445] Import facts for 'testhost2.example.com' completed. Added: 0, Updated: 0, Deleted 0 facts 2020-03-20T10:07:59 [W|app|0808e445] Action failed 2020-03-20T10:07:59 [I|app|0808e445] Rendering api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout 2020-03-20T10:07:59 [I|app|0808e445] Rendered api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout (0.9ms)
In reality, the error is usually somewhere in Host::Base.populate_fields_from_facts, but there is zero error reporting from there :(
Updated by Marek Hulán about 4 years ago
This behavior predates host substatuses and notification drawer. I assume we could leverage one of that. Either introduce a new host status or display a notification to the host owner?
Actions