Skip to content

Commit

Permalink
fix(docker): gracefully handle 400 responses
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 28, 2020
1 parent 7dd863f commit 28badee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/datasource/docker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,11 @@ async function getLabels(
if (err instanceof DatasourceError) {
throw err;
}
if (err.statusCode === 401) {
if (err.statusCode === 400 || err.statusCode === 401) {
logger.debug(
{ registry, dockerRepository: repository },
{ registry, dockerRepository: repository, err },
'Unauthorized docker lookup'
);
logger.debug({ err });
} else if (err.statusCode === 404) {
logger.warn(
{
Expand Down Expand Up @@ -591,7 +590,7 @@ async function getLabels(
'Ignoring quay.io errors until they fully support v2 schema'
);
} else {
logger.warn(
logger.info(
{ registry, dockerRepository: repository, tag, err },
'Unknown error getting Docker labels'
);
Expand Down

0 comments on commit 28badee

Please sign in to comment.