mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
[CORL-281] Metrics (#2298)
* feat: iunitial metrics implementation * fix: graphql endpoint was throwing errors. * feat: add metrics env variables to readme
This commit is contained in:
@@ -172,13 +172,18 @@ export class TalkError extends VError {
|
||||
this.param = param;
|
||||
}
|
||||
|
||||
public serializeExtensions(bundle: FluentBundle): TalkErrorExtensions {
|
||||
const message = translate(
|
||||
bundle,
|
||||
this.code,
|
||||
ERROR_TRANSLATIONS[this.code],
|
||||
this.context.pub
|
||||
);
|
||||
public serializeExtensions(bundle: FluentBundle | null): TalkErrorExtensions {
|
||||
let message: string;
|
||||
if (bundle) {
|
||||
message = translate(
|
||||
bundle,
|
||||
this.code,
|
||||
ERROR_TRANSLATIONS[this.code],
|
||||
this.context.pub
|
||||
);
|
||||
} else {
|
||||
message = this.code;
|
||||
}
|
||||
|
||||
return {
|
||||
id: this.id,
|
||||
|
||||
Reference in New Issue
Block a user