1
0
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:
Patrik J. Braun 2020-12-27 22:32:26 +01:00
parent b37d4ec8c8
commit fb39fb5854

View File

@ -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 {