Skip to content

Commit 27055d0

Browse files
authored
Merge pull request #233 from twittwer/master
handle custom errors thrown by authorization checker
2 parents 9f93e3a + d30a13e commit 27055d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/driver/express/ExpressDriver.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export class ExpressDriver extends BaseDriver implements Driver {
126126
};
127127

128128
if (isPromiseLike(checkResult)) {
129-
checkResult.then(result => handleError(result));
129+
checkResult
130+
.then(result => handleError(result))
131+
.catch(error => this.handleError(error, actionMetadata, action));
130132
} else {
131133
handleError(checkResult);
132134
}

0 commit comments

Comments
 (0)