mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
Fix entity referencing issue during post-seeded relational fetch
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export class Exception extends Error {
|
||||
code = 400;
|
||||
override name = "Exception";
|
||||
protected _context = undefined;
|
||||
|
||||
constructor(message: string, code?: number) {
|
||||
super(message);
|
||||
@@ -9,11 +10,16 @@ export class Exception extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
context(context: any) {
|
||||
this._context = context;
|
||||
return this;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
error: this.message,
|
||||
type: this.name
|
||||
//message: this.message
|
||||
type: this.name,
|
||||
context: this._context
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user