Skip to content
Snippets Groups Projects
Commit 0328c5b7 authored by Steve Reis's avatar Steve Reis
Browse files

candidate version, remove console logs

parent 4ac9cdb2
No related tags found
......@@ -93,9 +93,7 @@ export class AuthService {
payload.context,
);
console.log('isConnected', isConnected);
if (!isConnected) {
console.log('User need to reconnect');
throw new UnauthorizedException('User need to reconnect');
}
......@@ -109,8 +107,8 @@ export class AuthService {
}
return this.login(payload.context);
} catch (error) {
console.log(error);
throw new UnauthorizedException('Invalid refresh token');
const msg = error.message ?? 'Invalid refresh token';
throw new UnauthorizedException(msg);
}
}
......
......@@ -349,20 +349,20 @@ export default class DataShieldConnector implements Connector {
const cookies = [`sid=${user.extraFields['sid']}`, `user=${user.id}`];
const path = this.options.baseurl + 'getvars';
const response = await firstValueFrom(
await firstValueFrom(
this.httpService.get(path, {
headers: {
cookie: cookies.join(';'),
},
}),
);
console.log('status', response.status);
return true;
} catch (err) {
DataShieldConnector.logger.warn(
DataShieldConnector.logger.verbose(
`User ${user.id} is not connected to Datashield`,
);
DataShieldConnector.logger.warn(err);
DataShieldConnector.logger.debug(err);
return false;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment