mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
21 lines
476 B
TypeScript
21 lines
476 B
TypeScript
import { ObjectType, Field } from 'type-graphql'
|
|
import { TransactionErrorType } from '../enum/TransactionErrorType'
|
|
|
|
@ObjectType()
|
|
export class TransactionError implements Error {
|
|
constructor(type: TransactionErrorType, message: string) {
|
|
this.type = type
|
|
this.message = message
|
|
this.name = type.toString()
|
|
}
|
|
|
|
@Field(() => TransactionErrorType)
|
|
type: TransactionErrorType
|
|
|
|
@Field(() => String)
|
|
message: string
|
|
|
|
@Field(() => String)
|
|
name: string
|
|
}
|