Fixed auth returning 500 instead of 403

This commit is contained in:
thomashii 2021-05-31 09:05:34 +08:00
parent 3f42d1ff5f
commit a30201ebb1
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
name: angel3_cache name: angel3_cache
version: 4.0.0 version: 4.0.0
description: Support for server-side caching in Angel3 Framework description: Support server-side caching of reponse data from services.
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/cache homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/cache
environment: environment:
sdk: '>=2.12.0 <3.0.0' sdk: '>=2.12.0 <3.0.0'

View file

@ -188,7 +188,7 @@ abstract class Driver<
} }
throw AngelHttpException(e, throw AngelHttpException(e,
stackTrace: st, stackTrace: st,
statusCode: 500, statusCode: (e is AngelHttpException) ? e.statusCode : 500,
message: e?.toString() ?? '500 Internal Server Error'); message: e?.toString() ?? '500 Internal Server Error');
}, test: (e) => e is AngelHttpException).catchError( }, test: (e) => e is AngelHttpException).catchError(
(ee, StackTrace st) { (ee, StackTrace st) {