mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-04 03:49:28 +02:00
fixing ErrorDTO during request saving
This commit is contained in:
parent
b37d4ec8c8
commit
fb39fb5854
@ -33,10 +33,12 @@ export class ErrorDTO {
|
||||
|
||||
constructor(public code: ErrorCodes, public message?: string, public details?: any, req?: Request) {
|
||||
this.detailsStr = (this.details ? this.details.toString() : '') || ErrorCodes[code];
|
||||
this.request = {
|
||||
method: req.method,
|
||||
url: req.url
|
||||
};
|
||||
if (req) {
|
||||
this.request = {
|
||||
method: req.method,
|
||||
url: req.url
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
|
Loading…
Reference in New Issue
Block a user