-
Notifications
You must be signed in to change notification settings - Fork 187
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
docs(core): update examples to demonstrate z.errors.Error #198
Conversation
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.
self-review
throw new Error('The username and/or password you supplied is incorrect'); | ||
throw new z.errors.Error( | ||
'The username and/or password you supplied is incorrect', | ||
'AuthenticationError', |
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.
The second argument can be any code and as long as we're the only ones able to create troubleshooting docs, this isn't of much direct use to the developer.
However, the idea is/was that we'll grow a set of standard codes that we have generic troubleshooting docs on and ultimately, we'd to list the most common error codes we see for an app in its dashboard and maybe even allow partners to write their own troubleshooting docs for them.
@@ -8,7 +8,7 @@ const contentDisposition = require('content-disposition') | |||
// on the OneDrive API. We intentionally don't set it up as an `afterResposne` | |||
// handler because not *all* calls need it (i.e. the auth test and file create), | |||
// so we break it out and share the code this way instead. | |||
const parseResponse = (type, response) => { | |||
const parseResponse = (z, type, response) => { |
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.
Notice that the signature of this function has changed. All usage has been updated.
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.
Looks good! Feel free to merge once you move the doc changes on README.md
to README-source.md
.
Updates example apps and snippets to demonstrate (and with that encourage) the use of
z.errors.Error
overError
.JIRA:
SXP-1624
Replace use of Error by z.errors.Error in examples and docs