19 package com.basistech.df.cybertriage.autopsy.ctapi;
22 import java.util.Objects;
23 import org.apache.commons.lang3.StringUtils;
24 import org.apache.commons.lang3.exception.ExceptionUtils;
38 PROXY_UNAUTHORIZED(
"CT-407",
"Proxy authentication failed. Please validate the connection settings from the Options panel Proxy Settings."),
42 NETWORK_ERROR(
"CT-015",
"Error connecting to CyberTriage Cloud.\n"
43 +
"Check your firewall or proxy settings.\n"
44 +
"Contact Support (support@cybertriage.com) for further assistance");
48 private ErrorCode(String errorcode, String description) {
49 this.errorcode = errorcode;
50 this.description = description;
64 super(errorCode.name());
69 super(errorCode.name(), throwable);
79 return String.format(
"Malware scan error %s occurred. Please try \"Re Scan\" from the dashboard to attempt Malware scaning again. "
80 +
"\nPlease contact Basis support at %s for help if the problem presists.",
81 StringUtils.isNotBlank(getCause().getLocalizedMessage()) ?
"("+getCause().getLocalizedMessage()+
")":
"(Unknown)",
93 String stackTrace = ExceptionUtils.getStackTrace(throwable);
94 if (stackTrace.contains(
"UnknownHostException")) {
CTCloudException(CTCloudException.ErrorCode errorCode)
final ErrorCode errorCode
ErrorCode(String errorcode, String description)
static final String SUPPORT_AT_CYBERTRIAGE_DOT_COM
CTCloudException(CTCloudException.ErrorCode errorCode, Throwable throwable)
static ErrorCode parseUnknownException(Throwable throwable)