Skip to content

Commit

Permalink
Use the Restate server response in the overall error reason
Browse files Browse the repository at this point in the history
  • Loading branch information
pcholakov committed Jun 13, 2024
1 parent cc93e3d commit 708e106
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/restate-constructs/register-service-handler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,12 @@ export const handler: Handler<CloudFormationCustomResourceEvent, void> = async f

return; // Overall success!
} else {
failureReason = `Registration failed (${registerDeploymentResponse.status}): ${registerDeploymentResponse.statusText}`;
const errorBody = await registerDeploymentResponse.text();
failureReason = `Registration failed (${registerDeploymentResponse.status}): ${errorBody}`;
console.log({
message: `Got error response from Restate.`,
code: registerDeploymentResponse.status,
body: await registerDeploymentResponse.text(),
body: errorBody,
});
}
} catch (e) {
Expand Down

0 comments on commit 708e106

Please sign in to comment.