strictNullChecks (#4666)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
type E = { message: string, code: string, id: string, kind?: 'client' | 'server', httpStatusCode?: number };
|
||||
|
||||
export class ApiError extends Error {
|
||||
public message: string;
|
||||
public code: string;
|
||||
@@ -6,7 +8,7 @@ export class ApiError extends Error {
|
||||
public httpStatusCode?: number;
|
||||
public info?: any;
|
||||
|
||||
constructor(e?: { message: string, code: string, id: string, kind?: 'client' | 'server', httpStatusCode?: number }, info?: any) {
|
||||
constructor(e?: E | null | undefined, info?: any | null | undefined) {
|
||||
if (e == null) e = {
|
||||
message: 'Internal error occurred. Please contact us if the error persists.',
|
||||
code: 'INTERNAL_ERROR',
|
||||
|
Reference in New Issue
Block a user