File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 54
54
55
55
# Diagnostic reports (https://nodejs.org/api/report.html)
56
56
report. [0-9 ]* . [0-9 ]* . [0-9 ]* . [0-9 ]* .json
57
+ yalc. *
58
+ .yalc
Original file line number Diff line number Diff line change 56
56
"tsconfig-paths" : " ^4.2.0" ,
57
57
"typescript" : " ^5.7.3" ,
58
58
"typescript-eslint" : " ^8.20.0"
59
+ },
60
+ "dependencies" : {
61
+ "nestjs-offline-oauth2" : " file:.yalc/nestjs-offline-oauth2"
59
62
}
60
63
}
Original file line number Diff line number Diff line change 4
4
ExecutionContext ,
5
5
Injectable ,
6
6
Logger ,
7
+ UnauthorizedException ,
7
8
} from '@nestjs/common' ;
8
9
import { Reflector } from '@nestjs/core' ;
9
10
import { Roles } from './auth.decorators' ;
@@ -46,8 +47,7 @@ export class AuthGuard implements CanActivate {
46
47
) ;
47
48
return ! ! anyRoleMatch ;
48
49
} catch ( error : unknown ) {
49
- this . logger . warn ( ( error as Error ) . message ) ;
50
- return false ;
50
+ throw new UnauthorizedException ( error ) ;
51
51
}
52
52
}
53
53
public getUserGroups ( request : Request ) : string [ ] {
You can’t perform that action at this time.
0 commit comments