The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/apps/meteor/client/lib/errors/RocketChatError.ts

15 lines
410 B

export abstract class RocketChatError<TErrorId extends string, TDetails = unknown> extends Error {
public readonly error: TErrorId;
public readonly reason?: string;
public readonly details?: TDetails;
constructor(error: TErrorId, reason?: string, details?: TDetails) {
super(reason ? `${reason} [${error}]` : `[${error}]`);
this.error = error;
this.reason = reason;
this.details = details;
}
}