mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 20:00:33 +00:00
add server to monorepo.
This commit is contained in:
15
packages/server/src/exceptions/ServiceErrors.ts
Normal file
15
packages/server/src/exceptions/ServiceErrors.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import ServiceError from './ServiceError';
|
||||
|
||||
|
||||
export default class ServiceErrors {
|
||||
errors: ServiceError[];
|
||||
|
||||
constructor(errors: ServiceError[]) {
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
hasType(errorType: string) {
|
||||
return this.errors
|
||||
.some((error: ServiceError) => error.errorType === errorType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user