Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cloud-toolkit): remove a condition in error handler to make the bootstrap work again #972

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions packages/cloud-toolkit/src/services/http-forest-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ async function handledAxios<T>(
{ errorMessage }: { errorMessage: string },
): Promise<T> {
try {
const response = await axios(axiosRequestConfig);

if (response.status < 400) {
throw new BusinessError(
`Expected 200 OK, received ${response.status} ${response.statusText}`,
);
}

return response.data;
return (await axios(axiosRequestConfig)).data;
} catch (e) {
const error: Error = e;

Expand Down Expand Up @@ -116,7 +108,7 @@ export default class HttpForestServer {
'Content-Type': 'application/json',
},
},
{ errorMessage: `Failed to retrieve last published code details.` },
{ errorMessage: `Failed to retrieve last published code details` },
);
}
}
Expand Down
Loading