mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-15 08:00:05 +00:00
feat: added type for error response
This commit is contained in:
15
src/types/ErrorResponse.ts
Normal file
15
src/types/ErrorResponse.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export class ErrorResponse {
|
||||
body: ErrorBody
|
||||
|
||||
constructor(message: string, details?: any) {
|
||||
this.body = {
|
||||
message,
|
||||
details
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ErrorBody {
|
||||
message: string
|
||||
details: any
|
||||
}
|
||||
@@ -9,3 +9,4 @@ export * from './SASjsWaitingRequest'
|
||||
export * from './ServerType'
|
||||
export * from './Session'
|
||||
export * from './UploadFile'
|
||||
export * from './ErrorResponse'
|
||||
|
||||
Reference in New Issue
Block a user