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

fix refresh code condition

parent 6c4fca24
......@@ -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