public static RestServiceErrorCode getRestServiceErrorCode(AccountServiceErrorCode accountServiceErrorCode) {
    switch (accountServiceErrorCode) {
      case NotFound:
        return NotFound;
      case ResourceConflict:
        return Conflict;
      case BadRequest:
        return BadRequest;
      case UpdateDisabled:
        return ServiceUnavailable;
      case ResourceHasGone:
      case Deleted:
        return Deleted;
      case MethodNotAllowed:
        return NotAllowed;
      default:
        return InternalServerError;
    }
  }
Gets the RestServiceErrorCode that corresponds to the {@code accountServiceErrorCode}.
@param accountServiceErrorCode input {@link AccountServiceErrorCode}.
@return the RestServiceErrorCode that the {@code accountServiceErrorCode} belongs to.
ambry-api/src/main/java/com/github/ambry/rest/RestServiceErrorCode.java