Skip to content

Commit

Permalink
fix: adding status text to error response
Browse files Browse the repository at this point in the history
  • Loading branch information
dzehnder committed Aug 23, 2024
1 parent d8fc8c6 commit 51d804a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/spacecat-shared-google-client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default class GoogleClient {
});

if (!response.ok) {
throw new Error(`Error inspecting URL ${url}. Returned status ${response.status}`);
throw new Error(`Error inspecting URL ${url}. Returned status ${response.status} ${response.statusText}`);
}

try {
Expand Down
2 changes: 1 addition & 1 deletion packages/spacecat-shared-google-client/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ describe('GoogleClient', () => {
try {
await googleClient.urlInspect(url);
} catch (error) {
expect(error.message).to.equal(`Error inspecting URL ${url}. Returned status 500`);
expect(error.message).to.equal(`Error inspecting URL ${url}. Returned status 500 `);
}
});

Expand Down

0 comments on commit 51d804a

Please sign in to comment.