gradido/dlt-connector/src/graphql/model/TransactionError.ts
2023-09-06 13:02:45 +02:00

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
}