First upload version 0.0.1
This commit is contained in:
34
node_modules/@octokit/plugin-paginate-graphql/dist-src/errors.js
generated
vendored
Normal file
34
node_modules/@octokit/plugin-paginate-graphql/dist-src/errors.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
const generateMessage = (path, cursorValue) => `The cursor at "${path.join(
|
||||
","
|
||||
)}" did not change its value "${cursorValue}" after a page transition. Please make sure your that your query is set up correctly.`;
|
||||
class MissingCursorChange extends Error {
|
||||
constructor(pageInfo, cursorValue) {
|
||||
super(generateMessage(pageInfo.pathInQuery, cursorValue));
|
||||
this.pageInfo = pageInfo;
|
||||
this.cursorValue = cursorValue;
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
name = "MissingCursorChangeError";
|
||||
}
|
||||
class MissingPageInfo extends Error {
|
||||
constructor(response) {
|
||||
super(
|
||||
`No pageInfo property found in response. Please make sure to specify the pageInfo in your query. Response-Data: ${JSON.stringify(
|
||||
response,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
this.response = response;
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
}
|
||||
name = "MissingPageInfo";
|
||||
}
|
||||
export {
|
||||
MissingCursorChange,
|
||||
MissingPageInfo
|
||||
};
|
||||
Reference in New Issue
Block a user