Skip to content

Commit cb76bc4

Browse files
fix!: rename errors to error in 400 responses
For consistency, since the value of this key is a scalar (`string`) and not a vector, and for congruence with our convention at BitGo of handling errors. Closes BitGo#39 BREAKING CHANGE: rename `errors` to `error` in 400 response
1 parent ff78c84 commit cb76bc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/express-wrapper/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const decodeRequestAndEncodeResponse = <Route extends HttpRoute>(
4848
const validationErrors = PathReporter.failure(maybeRequest.left);
4949
const validationErrorMessage = validationErrors.join('\n');
5050
res.writeHead(400, { 'Content-Type': 'application/json' });
51-
res.write(JSON.stringify({ errors: validationErrorMessage }));
51+
res.write(JSON.stringify({ error: validationErrorMessage }));
5252
res.end();
5353
return;
5454
}

0 commit comments

Comments
 (0)