mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
53354224fc
Upgrades biome to 1.6.1, and updates husky pre-commit hook. Most changes here are making type imports explicit.
23 lines
577 B
TypeScript
23 lines
577 B
TypeScript
import { type ApiErrorSchema, UnleashError } from './unleash-error';
|
|
|
|
export default class IncompatibleProjectError extends UnleashError {
|
|
statusCode = 403;
|
|
|
|
constructor(targetProject: string) {
|
|
super(`${targetProject} is not a compatible target`);
|
|
}
|
|
|
|
toJSON(): ApiErrorSchema {
|
|
return {
|
|
...super.toJSON(),
|
|
details: [
|
|
{
|
|
validationErrors: [],
|
|
message: this.message,
|
|
description: this.message,
|
|
},
|
|
],
|
|
};
|
|
}
|
|
}
|