Skip to content

Commit ecc8037

Browse files
committed
fix: return error body with 412 response
1 parent 065952c commit ecc8037

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ app.put("/:id", sessionCors, (req, res) => {
118118
return res.status(400).json({ "errcode": "M_MISSING_PARAM", "error": "Missing If-Match header" });
119119
} else if (ifMatch !== rv.etag) {
120120
rv.setHeaders(res);
121-
return res.send(412).json({ "errcode": "M_UNKNOWN", "org.matrix.msc4108.errcode": "M_CONCURRENT_WRITE", "error": "Rendezvous has been modified" });
121+
return res.status(412).json({ "errcode": "M_UNKNOWN", "org.matrix.msc4108.errcode": "M_CONCURRENT_WRITE", "error": "Rendezvous has been modified" });
122122
}
123123

124124
rv.update(req.body, contentType);

0 commit comments

Comments
 (0)