mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 16:03:02 +00:00
null check for auth interceptor
This commit is contained in:
@@ -162,8 +162,10 @@ export class AuthInterceptor implements HttpInterceptor {
|
|||||||
// clean eventually refresh Requests list
|
// clean eventually refresh Requests list
|
||||||
this.refreshTokenRequestUrls = [];
|
this.refreshTokenRequestUrls = [];
|
||||||
// console.log('error: ', error);
|
// console.log('error: ', error);
|
||||||
const location = this.getLocationfromHeader(error.headers);
|
let location = '';
|
||||||
|
if (error.headers.get('www-authenticate') != null) {
|
||||||
|
location = this.getLocationfromHeader(error.headers);
|
||||||
|
}
|
||||||
// Create a new HttpResponse and return it, so it can be handle properly by AuthService.
|
// Create a new HttpResponse and return it, so it can be handle properly by AuthService.
|
||||||
const authResponse = new HttpResponse({
|
const authResponse = new HttpResponse({
|
||||||
body: this.makeAuthStatusObject(false, null, error.error, location),
|
body: this.makeAuthStatusObject(false, null, error.error, location),
|
||||||
|
Reference in New Issue
Block a user