Skip to content

Better errors on http errors (include part of body, decode json) - #3061

Merged
nuclearcat merged 2 commits into
kernelci:mainfrom
nuclearcat:better-errors
Mar 3, 2026
Merged

nuclearcat merged 2 commits into
kernelci:mainfrom
nuclearcat:better-errors

Conversation

@nuclearcat

Copy link
Copy Markdown
Member

As reported in discord, often error messages are not really helpful, so we need to improve them.

    kci-dev --instance dev maestro results --nodeid 69a01f7ebdc4039366c2729b
            "error_code": "submit_error",
            "error_msg": "400 Client Error: Bad Request for url: https://lava.XXX.com/api/v0.2/jobs/?format=json&limit=256",

We will try to decode now body as well, if it is json - try to extract variable, if not - all content, but truncate to 512 chars, so mongodb and other storages wont explode from lengthy messages.

…apshot

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat
nuclearcat added this pull request to the merge queue Mar 3, 2026
Merged via the queue into kernelci:main with commit 9565924 Mar 3, 2026
8 checks passed
@nuclearcat
nuclearcat deleted the better-errors branch March 3, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant