mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 11:50:31 +00:00
fix: transaction locking handling
This commit is contained in:
@@ -4,16 +4,18 @@ export class ServiceError extends Error {
|
||||
errorType: string;
|
||||
message: string;
|
||||
payload: any;
|
||||
httpStatus: HttpStatus;
|
||||
|
||||
constructor(errorType: string, message?: string, payload?: any) {
|
||||
constructor(errorType: string, message?: string, payload?: any, httpStatus?: HttpStatus) {
|
||||
super(message);
|
||||
|
||||
this.errorType = errorType;
|
||||
this.message = message || null;
|
||||
this.payload = payload;
|
||||
this.httpStatus = httpStatus || HttpStatus.BAD_REQUEST;
|
||||
}
|
||||
|
||||
getStatus(): HttpStatus {
|
||||
return HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
return this.httpStatus;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user