mirror of
https://github.com/Azure/setup-helm.git
synced 2025-09-10 22:16:29 +00:00
Add node modules and new code for release (#57)
Co-authored-by: taakleton <taakleton@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
da63a48ad7
commit
a517f2ff65
21
node_modules/@octokit/graphql/dist-src/error.js
generated
vendored
Normal file
21
node_modules/@octokit/graphql/dist-src/error.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
function _buildMessageForResponseErrors(data) {
|
||||
return (`Request failed due to following response errors:\n` +
|
||||
data.errors.map((e) => ` - ${e.message}`).join("\n"));
|
||||
}
|
||||
export class GraphqlResponseError extends Error {
|
||||
constructor(request, headers, response) {
|
||||
super(_buildMessageForResponseErrors(response));
|
||||
this.request = request;
|
||||
this.headers = headers;
|
||||
this.response = response;
|
||||
this.name = "GraphqlResponseError";
|
||||
// Expose the errors and response data in their shorthand properties.
|
||||
this.errors = response.errors;
|
||||
this.data = response.data;
|
||||
// Maintains proper stack trace (only available on V8)
|
||||
/* istanbul ignore next */
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user