blob: 41ece6ae1501999d2773ba7fa1a5811bf440d688 [file] [log] [blame]
import ErrorUtils from "./ErrorUtils";
let idSequence = 0;
class UnhandledError {
constructor({
message = null,
error = null,
details = null,
suppressDisplay = false,
suppressLogging = false,
}) {
this.id = idSequence++;
this.message = message;
this.error = error;
this.details = details;
this.suppressDisplay = suppressDisplay;
this.suppressLogging = suppressLogging;
this.createdDate = new Date();
}
get isUnauthenticatedError() {
return ErrorUtils.isUnauthenticatedError(this.error);
}
}
export default UnhandledError;