Skip to content

Commit 201b851

Browse files
feat(AuthorizationChecker): allow throwing of custom errors
1 parent faf0f15 commit 201b851

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/driver/koa/KoaDriver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export class KoaDriver extends BaseDriver implements Driver {
103103
};
104104

105105
if (isPromiseLike(checkResult)) {
106-
return checkResult.then(result => handleError(result));
106+
return checkResult
107+
.then(result => handleError(result))
108+
.catch(error => this.handleError(error, actionMetadata, action));
107109
} else {
108110
handleError(checkResult);
109111
}

0 commit comments

Comments
 (0)