Skip to content

Commit

Permalink
fix: pr
Browse files Browse the repository at this point in the history
  • Loading branch information
alban bertolini authored and alban bertolini committed Feb 6, 2024
1 parent 6b1d579 commit 1b3c27d
Showing 1 changed file with 2 additions and 10 deletions.
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

0 comments on commit 1b3c27d

Please sign in to comment.