1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-04-14 01:43:13 +00:00

fix(error-handling): added InternalServerError

This commit is contained in:
Yury Shkoda
2021-03-10 14:43:47 +03:00
parent 599c130395
commit 719135e366
16 changed files with 76 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
import { Job } from './Job'
import { Job } from '../Job'
export class ComputeJobExecutionError extends Error {
constructor(public job: Job, public log: string) {

View File

@@ -0,0 +1,9 @@
export class InternalServerError extends Error {
constructor() {
super('Error: Internal server error.')
this.name = 'InternalServerError'
Object.setPrototypeOf(this, InternalServerError.prototype)
}
}

View File

@@ -0,0 +1,7 @@
export * from './AuthorizeError'
export * from './ComputeJobExecutionError'
export * from './InternalServerError'
export * from './JobExecutionError'
export * from './LoginRequiredError'
export * from './NotFoundError'
export * from './ErrorResponse'

View File

@@ -1,14 +1,10 @@
export * from './ComputeJobExecutionError'
export * from './Context'
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 './Session'