fix: handle auth and server error during swap (#593)
* fix: change execution order for light node upgrade * refactor: grab new configuration from post config request * fix: only print successful light node upgrade when it really happens * fix: log full desktop side swap error (#596) * refactor: try to make the auth error in swap nicer * refactor: make error instruction consistent * fix: avoid overwriting daiToSwap when it is set manually
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
export class AuthError extends Error {
|
||||
constructor() {
|
||||
super('Bad API key')
|
||||
this.name = 'AuthError'
|
||||
}
|
||||
}
|
||||
|
||||
export function isAuthError(error: unknown): error is AuthError {
|
||||
return error instanceof Error && error.name === 'AuthError'
|
||||
}
|
||||
Reference in New Issue
Block a user