mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-14 07:30:05 +00:00
fix(*): separate job execution code from main SASjs class
This commit is contained in:
7
src/types/AuthorizeError.ts
Normal file
7
src/types/AuthorizeError.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class AuthorizeError extends Error {
|
||||
constructor(public message: string, public confirmUrl: string) {
|
||||
super(message)
|
||||
this.name = 'AuthorizeError'
|
||||
Object.setPrototypeOf(this, AuthorizeError.prototype)
|
||||
}
|
||||
}
|
||||
11
src/types/JobExecutionError.ts
Normal file
11
src/types/JobExecutionError.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class JobExecutionError extends Error {
|
||||
constructor(
|
||||
public errorCode: number,
|
||||
public errorMessage: string,
|
||||
public result: string
|
||||
) {
|
||||
super(`Error Code ${errorCode}: ${errorMessage}`)
|
||||
this.name = 'JobExecutionError'
|
||||
Object.setPrototypeOf(this, JobExecutionError.prototype)
|
||||
}
|
||||
}
|
||||
7
src/types/LoginRequiredError.ts
Normal file
7
src/types/LoginRequiredError.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class LoginRequiredError extends Error {
|
||||
constructor() {
|
||||
super('Auth error: You must be logged in to access this resource')
|
||||
this.name = 'LoginRequiredError'
|
||||
Object.setPrototypeOf(this, LoginRequiredError.prototype)
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,11 @@ export * from './CsrfToken'
|
||||
export * from './ErrorResponse'
|
||||
export * from './Folder'
|
||||
export * from './Job'
|
||||
export * from './JobExecutionError'
|
||||
export * from './JobDefinition'
|
||||
export * from './JobResult'
|
||||
export * from './Link'
|
||||
export * from './LoginRequiredError'
|
||||
export * from './SASjsConfig'
|
||||
export * from './SASjsRequest'
|
||||
export * from './SASjsWaitingRequest'
|
||||
|
||||
Reference in New Issue
Block a user