Github API

This commit is contained in:
Luis Fernando Molina committed 2021-01-06 10:55:01 +01:00
1 parent 2efbf9c8aa
commit a9012f1bbf
282 files changed
+128405 -3

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
export class GraphqlError extends Error {
constructor(request, response) {
const message = response.data.errors[0].message;
super(message);
Object.assign(this, response.data);
Object.assign(this, { headers: response.headers });
this.name = "GraphqlError";
this.request = request;
// Maintains proper stack trace (only available on V8)
/* istanbul ignore next */
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
}
}