-
Notifications
You must be signed in to change notification settings - Fork 886
chore(site): remove create template xservice #10112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
export class JobError extends Error { | ||
public job: ProvisionerJob; | ||
public version: TemplateVersion; | ||
|
||
constructor(job: ProvisionerJob, version: TemplateVersion) { | ||
super(job.error); | ||
this.job = job; | ||
this.version = version; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have somewhere more general we can put these sorts of errors? not crazy about this being tucked away in queries/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't but I'm open to it if you have any place or organization in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe util/errors or something? I don’t tend to like util/ folders, but it’d be slightly more reusable there until we think of somewhere better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... Idk but I feel it is kinda of far from where it is used since it is only used there - for now and probably it will be the only place where it makes sense IMO.
In the process of removing the create template service, I split the page into three views to represent each possible action:
I think with this, things are easier to reason about.
PS: I tried my best not to create deep abstractions so for now, I would rather have more duplicate code - but easier to understand - than very low code that is hard to change later.
Related to: #9940