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
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
environment:
sdk: '>=2.12.0 <3.0.0'

View file

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