mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-13 11:17:26 +02:00
- In order for a feature toggle to be allowed to change project, the target project must have the same enabled environments. - If the feature toggle has an environment which is not in use that does not exist in target project, this is ok. Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com> Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
24 lines
605 B
TypeScript
24 lines
605 B
TypeScript
export default class IncompatibleProjectError extends Error {
|
|
constructor(targetProject: string) {
|
|
super();
|
|
Error.captureStackTrace(this, this.constructor);
|
|
|
|
this.name = this.constructor.name;
|
|
this.message = `${targetProject} is not a compatible target`;
|
|
}
|
|
|
|
toJSON(): any {
|
|
const obj = {
|
|
isJoi: true,
|
|
name: this.constructor.name,
|
|
details: [
|
|
{
|
|
validationErrors: [],
|
|
message: this.message,
|
|
},
|
|
],
|
|
};
|
|
return obj;
|
|
}
|
|
}
|