feat: add responses package
This commit is contained in:
11
packages/responses/src/Domain/Error/ClientError.ts
Normal file
11
packages/responses/src/Domain/Error/ClientError.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Error } from '../Http/Error'
|
||||
|
||||
export class ClientDisplayableError {
|
||||
constructor(public text: string, public title?: string, public tag?: string) {
|
||||
console.error('Client Displayable Error:', text, title || '', tag || '')
|
||||
}
|
||||
|
||||
static FromError(error: Error) {
|
||||
return new ClientDisplayableError(error.message, undefined, error.tag)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user