|
@@ -82,7 +82,7 @@ export class DefaultInterceptor implements HttpInterceptor {
|
|
|
// inside the body of the response.
|
|
// inside the body of the response.
|
|
|
const graqhQLErrors = response.body.errors;
|
|
const graqhQLErrors = response.body.errors;
|
|
|
if (graqhQLErrors && Array.isArray(graqhQLErrors)) {
|
|
if (graqhQLErrors && Array.isArray(graqhQLErrors)) {
|
|
|
- const firstCode: string = graqhQLErrors[0].extensions.code;
|
|
|
|
|
|
|
+ const firstCode: string = graqhQLErrors[0]?.extensions?.code;
|
|
|
if (firstCode === 'FORBIDDEN') {
|
|
if (firstCode === 'FORBIDDEN') {
|
|
|
this.authService.logOut().subscribe(() => {
|
|
this.authService.logOut().subscribe(() => {
|
|
|
if (!window.location.pathname.includes('login')) {
|
|
if (!window.location.pathname.includes('login')) {
|