refactor: Use generateAuthUrl method instead of createAuthData
This commit is contained in:
14
packages/backend/src/errors/generate-auth-url.ts
Normal file
14
packages/backend/src/errors/generate-auth-url.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { IJSONObject } from '@automatisch/types';
|
||||
import BaseError from './base';
|
||||
|
||||
export default class GenerateAuthUrlError extends BaseError {
|
||||
constructor(error: IJSONObject) {
|
||||
const computedError =
|
||||
((error.response as IJSONObject)?.data as IJSONObject) ||
|
||||
(error.message as string);
|
||||
|
||||
super(computedError);
|
||||
|
||||
this.message = `Error occured while creating authorization URL!`;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user