Permalink
Cannot retrieve contributors at this time
21 lines (21 sloc)
843 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/@octokit/graphql/dist-src/error.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} | |
} |