Skip to content

Commit

Permalink
Put error message in response JSON as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Jul 8, 2024
1 parent 9bb996d commit 2cce247
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,11 @@ app.delete("/stage-state/:studentID/:storyName/:stageName", async (req, res) =>
});
} else {
res.status(400);
res.statusMessage = "No such (student, story, stage) combination found";
res.end();
const message = "No such (student, story, stage) combination found";
res.statusMessage = message;
res.json({
message,
});
}
});

Expand Down

0 comments on commit 2cce247

Please sign in to comment.