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 branches found
No related tags found
No related merge requests found
...@@ -93,9 +93,7 @@ export class AuthService { ...@@ -93,9 +93,7 @@ export class AuthService {
payload.context, payload.context,
); );
console.log('isConnected', isConnected);
if (!isConnected) { if (!isConnected) {
console.log('User need to reconnect');
throw new UnauthorizedException('User need to reconnect'); throw new UnauthorizedException('User need to reconnect');
} }
...@@ -109,8 +107,8 @@ export class AuthService { ...@@ -109,8 +107,8 @@ export class AuthService {
} }
return this.login(payload.context); return this.login(payload.context);
} catch (error) { } catch (error) {
console.log(error); const msg = error.message ?? 'Invalid refresh token';
throw new UnauthorizedException('Invalid refresh token'); throw new UnauthorizedException(msg);
} }
} }
......
...@@ -349,20 +349,20 @@ export default class DataShieldConnector implements Connector { ...@@ -349,20 +349,20 @@ export default class DataShieldConnector implements Connector {
const cookies = [`sid=${user.extraFields['sid']}`, `user=${user.id}`]; const cookies = [`sid=${user.extraFields['sid']}`, `user=${user.id}`];
const path = this.options.baseurl + 'getvars'; const path = this.options.baseurl + 'getvars';
const response = await firstValueFrom( await firstValueFrom(
this.httpService.get(path, { this.httpService.get(path, {
headers: { headers: {
cookie: cookies.join(';'), cookie: cookies.join(';'),
}, },
}), }),
); );
console.log('status', response.status);
return true; return true;
} catch (err) { } catch (err) {
DataShieldConnector.logger.warn( DataShieldConnector.logger.verbose(
`User ${user.id} is not connected to Datashield`, `User ${user.id} is not connected to Datashield`,
); );
DataShieldConnector.logger.warn(err); DataShieldConnector.logger.debug(err);
return false; 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