-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feature) Error tracking #224
Conversation
const errorLogDTO = ( | ||
eid: string, | ||
pid: string, | ||
pg: string, | ||
dv: string, | ||
br: string, | ||
os: string, | ||
lc: string, | ||
cc: string, | ||
rg: string, | ||
ct: string, | ||
name: string, | ||
message: string, | ||
lineno: number, | ||
colno: number, | ||
filename: string, | ||
): Array<string | number | string[]> => { | ||
return [ | ||
eid, | ||
pid, | ||
pg, | ||
dv, | ||
br, | ||
os, | ||
lc, | ||
cc, | ||
rg, | ||
ct, | ||
name, | ||
message, | ||
lineno, | ||
colno, | ||
filename, | ||
dayjs.utc().format('YYYY-MM-DD HH:mm:ss'), | ||
] | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the DTO in a separate file.
const getEIDsArray = (eids, eid) => { | ||
const eidsEmpty = _isEmpty(eids) | ||
const eidEmpty = _isEmpty(eid) | ||
if (eidsEmpty && eidEmpty) { | ||
throw new BadRequestException( | ||
"An array of Error ID's (eids) or a Error ID (eid) has to be provided", | ||
) | ||
} | ||
if (!eidsEmpty && !eidEmpty) { | ||
throw new BadRequestException( | ||
"Please provide either an array of Error ID's (eids) or a Error ID (eid), but not both", | ||
) | ||
} | ||
|
||
if (!eidsEmpty) { | ||
return eids | ||
} | ||
|
||
return [eid] | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take the function out to the service.
] as const) { | ||
@ApiProperty() | ||
@IsNotEmpty() | ||
eid: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name the field better errorId
.
take: number | ||
|
||
skip: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validate it!!!
Any idea on when this will be available in the docker version? |
soon, I promise. I'll fix a few bugs related to timezones first and will start working on a new selfhosted release |
Ticket:
Self-hosted support
Database migrations
Documentation