Project

General

Profile

Actions

Bug #29385

open

errors when submitting bad facts are not helpful

Added by Evgeni Golov about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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 :(

Actions #1

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

Also available in: Atom PDF