Skip to content

Commit

Permalink
Account for both JSON and non-JSON error bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
that-one-tom authored and netroy committed May 15, 2023
1 parent af66f9f commit a65d149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/credentials/oauth2Credential.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ oauth2CredentialController.get(

return res.sendFile(pathResolve(TEMPLATES_DIR, 'oauth-callback.html'));
} catch (error) {
return renderCallbackError(res, error?.body ? Object.keys(error.body).map(key => error.body[key]).join(': ') : (error as Error).message);
return renderCallbackError(res, error?.body ? JSON.stringify(error.body) : (error as Error).message);
}
},
);

0 comments on commit a65d149

Please sign in to comment.