getErrorCode static method
Returns the error code string for an ErrorCode enum.
Implementation
static String getErrorCode(ErrorCode code) {
switch (code) {
case ErrorCode.invalidRequest:
return "1001";
case ErrorCode.genericError:
return "1002";
}
}