Skip to content

Commit 2aa4fbc

Browse files
committed
pass through the model to the error handler
1 parent 39d9eb4 commit 2aa4fbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/schemaHandler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ class SchemaHandler {
6868
).catch((err) => {
6969
if (err.errors) {
7070
for (const error of err?.errors) {
71-
this.__HTTPError(error);
71+
this.__HTTPError(error, model);
7272
}
7373
} else {
74-
this.__HTTPError(err);
74+
this.__HTTPError(err, model);
7575
}
7676
return modelSchema;
7777
});
@@ -228,7 +228,7 @@ class SchemaHandler {
228228
}
229229
}
230230

231-
__HTTPError(error) {
231+
__HTTPError(error, model) {
232232
if (error.message.includes("HTTP ERROR")) {
233233
// throw err;
234234
throw new Error(

0 commit comments

Comments
 (0)