Skip to content

Commit

Permalink
fix: Include the URL in the bitbucket API error message to make it ea…
Browse files Browse the repository at this point in the history
…sier to debug

Signed-off-by: Yoriyasu Yano <430092+yorinasub17@users.noreply.github.com>
  • Loading branch information
yorinasub17 committed Oct 30, 2023
1 parent a24b5bb commit 1f3b709
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bbstd/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class BitBucket {
});
if (!response.ok) {
const text = await response.text();
throw new Error(`BitBucket API Error (${response.status}): ${text}`);
throw new Error(
`BitBucket API Error on URL ${url} (${response.status}): ${text}`,
);
}
return response;
}
Expand Down Expand Up @@ -105,7 +107,9 @@ export class BitBucket {
});
if (!response.ok) {
const text = await response.text();
throw new Error(`BitBucket API Error (${response.status}): ${text}`);
throw new Error(
`BitBucket API Error on url ${url} (${response.status}): ${text}`,
);
}
return response;
}
Expand Down

0 comments on commit 1f3b709

Please sign in to comment.