-
Notifications
You must be signed in to change notification settings - Fork 53
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
[Proposal] Unified Client interface #56
base: master
Are you sure you want to change the base?
Conversation
class CustomError extends VError { | ||
constructor() { | ||
super(...arguments); | ||
this.name = this.constructor.name; |
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.
Does this work without babel transpiling? anything in the JS spec that says a constructor name equals the name of the subclass?
@@ -0,0 +1,11 @@ | |||
export default class Base { |
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.
perhaps we call it BaseModel
to be more descriptive?
let exception = new NotImplementedError(); | ||
expect(NotImplementedError.matches(exception)).to.be.true; | ||
}) | ||
}); |
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.
TODO: Add tests for error chaining
22f578d
to
65de0db
Compare
@busticated this is the stateful |
i moved this back into "draft" state to calm the reminders. i don't see us merging this anytime soon if only b/c it's so out of date but it's a good reference so i'm fine w/ leaving it open as a draft for now. |
Adds build targets support to Client class and drafts a proposal for unified endpoint/resource handling.
Notes about some decisions:
undefined
values but still be documentedbuild_target
endpoint is an interesting example because it groups targets by version name but we want to access each build target separately (which would be possible in endpoint V2). So we're normalizing the data and providing the interface which will remain constant even after switching the backing endpointError
building/handling pattern that combines our three implementations mentioned in the ClubHouse story