Skip to content

Commit

Permalink
Clone error body
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Oct 4, 2024
1 parent 9ca489f commit 10e702f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/routes/auth-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const authTokenHandler = asyncHandler(async (req, res) => {

if (!bungieResponse.ok) {
try {
const errorBody = (await bungieResponse.json()) as ApiError;
const errorBody = (await bungieResponse.clone().json()) as ApiError;
if (errorBody.ErrorStatus === 'WebAuthRequired') {
metrics.increment('authToken.webAuthRequired.count');
res.status(401).send({
Expand Down

0 comments on commit 10e702f

Please sign in to comment.