Skip to content

Handle MusicBrainz auth error #129

@jp-sarte

Description

@jp-sarte

I've found that this error specifically happen when I cancel cyanrip early and immediately try to re-rip. My suspicion is that we just need to relax for a few moments and retry, after we get this error.

cyanrip/src/musicbrainz.c

Lines 221 to 225 in d1210af

case eQuery_AuthenticationError:
case eQuery_FetchError:
case eQuery_RequestError:
cyanrip_log(ctx, 0, "Error fetching/requesting/auth, this shouldn't happen.\n");
break;

Other than that, in the web-browser MB is sometimes refusing to handle requests. I think that a simple back-off and retry, as a "generic" fallback, will handle these MB-related errors.

I suggest that we wait for ~15s and retry for all of the following errors.

cyanrip/src/musicbrainz.c

Lines 217 to 225 in d1210af

case eQuery_Timeout:
case eQuery_ConnectionError:
cyanrip_log(ctx, 0, "Connection failed, try again? Or disable via -N\n");
break;
case eQuery_AuthenticationError:
case eQuery_FetchError:
case eQuery_RequestError:
cyanrip_log(ctx, 0, "Error fetching/requesting/auth, this shouldn't happen.\n");
break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions