Skip to content

Commit 2e83943

Browse files
committed
Merge pull request oauthjs#101 from thomasdashney/master
changed error handler res.send to fix express deprecation warnings
2 parents 0050abf + ca81e2c commit 2e83943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/oauth2server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ OAuth2Server.prototype.errorHandler = function () {
127127
if (err.headers) res.set(err.headers);
128128
delete err.headers;
129129

130-
res.send(err.code, err);
130+
res.status(err.code).send(err);
131131
};
132132
};
133133

0 commit comments

Comments
 (0)