feat: add responses package

This commit is contained in:
Karol Sójko
2022-07-06 11:59:04 +02:00
parent 67b0918ba8
commit 9d1f7043e5
73 changed files with 977 additions and 14 deletions

View 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)
}
}