mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
updates
This commit is contained in:
14
src/utils/errors.ts
Normal file
14
src/utils/errors.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
class NotReadyError extends Error {
|
||||
#reason?: string;
|
||||
|
||||
constructor(reason?: string, message?: string) {
|
||||
super(message || reason || 'Resource is not ready');
|
||||
this.#reason = reason;
|
||||
}
|
||||
|
||||
get reason() {
|
||||
return this.#reason;
|
||||
}
|
||||
}
|
||||
|
||||
export { NotReadyError };
|
||||
Reference in New Issue
Block a user