Skip to content

Log HTTP response body on failure #301

Open
@dcelasun

Description

@dcelasun

I have a package that uses regex like this:

[snowflake-client]
source = "regex"
url = "https://www.snowflake.com/en/developers/downloads/snowsql/"
regex = 'snowsql\/bootstrap\/\d\.\d\/linux_x86_64\/snowsql-([\d.]+)-linux_x86_64\.bash'

It works well most of the time, but occasionally fails with:

[E 05-26 02:19:49.193 core:366] snowflake-client: version string not found.
[E 05-26 02:19:49.193 core:448] snowflake-client: no-result error="GetVersionError('version string not found.')"

I don't want to use -l debug as the toml file has more than a dozen packages and the output would be too spammy. Is there any way to log HTTP response only on failure?

If not, would it be possible to add something like a --log-failures-prefix nvfail- flag which would generate nvfail-snowflake-client.txt?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions