Skip to content

Commit

Permalink
fix: return error body with 412 response
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns committed Apr 23, 2024
1 parent 065952c commit ecc8037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ app.put("/:id", sessionCors, (req, res) => {
return res.status(400).json({ "errcode": "M_MISSING_PARAM", "error": "Missing If-Match header" });
} else if (ifMatch !== rv.etag) {
rv.setHeaders(res);
return res.send(412).json({ "errcode": "M_UNKNOWN", "org.matrix.msc4108.errcode": "M_CONCURRENT_WRITE", "error": "Rendezvous has been modified" });
return res.status(412).json({ "errcode": "M_UNKNOWN", "org.matrix.msc4108.errcode": "M_CONCURRENT_WRITE", "error": "Rendezvous has been modified" });
}

rv.update(req.body, contentType);
Expand Down

0 comments on commit ecc8037

Please sign in to comment.