Commit e6f2606c authored by Diego Molteni's avatar Diego Molteni
Browse files

Merge branch 'slb/dm3/fix-old-imptoken' into 'master'

fix refresh code condition

See merge request !174
parents 6c4fca24 f8539d3f
Pipeline #60092 passed with stages
in 5 minutes and 52 seconds
......@@ -91,7 +91,11 @@ export class ImpTokenDAO {
try {
await request(options);
} catch (error) {
throw (Error.make(Error.Status.BAD_REQUEST, 'The impersonation token cannot be refreshed.'));
// For any code different than 4xx the imptoken can be refreshed
// This is a temporary fix to handle unavailability of client infrastructure
if (error.statusCode >= 400 && error.statusCode <= 499) {
throw (Error.make(Error.Status.BAD_REQUEST, 'The impersonation token cannot be refreshed.'));
}
}
}
......
Markdown is supported
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