Skip to content

Commit

Permalink
feat: use custom handler if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
williams-nova committed May 15, 2023
1 parent 622df71 commit 1dee621
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/middleware/native/oas-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export class OASErrorHandler extends OASBase {
sendErr(401);
} else if (err.name === "AuthError") {
sendErr(403);
} else if (config.customHandler) {
}

if (config.customHandler) {
config.customHandler(err, sendErr);
}

Expand Down

0 comments on commit 1dee621

Please sign in to comment.