public static RestServiceErrorCode getRestServiceErrorCode(RouterErrorCode routerErrorCode) {
    switch (routerErrorCode) {
      case InvalidBlobId:
      case InvalidPutArgument:
      case BadInputChannel:
        return BadRequest;
      case BlobDeleted:
      case BlobExpired:
        return Deleted;
      case BlobAuthorizationFailure:
        return AccessDenied;
      case BlobDoesNotExist:
        return NotFound;
      case BlobUpdateNotAllowed:
        return NotAllowed;
      case BlobTooLarge:
        return RequestTooLarge;
      case RangeNotSatisfiable:
        return RangeNotSatisfiable;
      case OperationTimedOut:
      case AmbryUnavailable:
      case RouterClosed:
        return ServiceUnavailable;
      case InsufficientCapacity:
        return InsufficientCapacity;
      case BlobUndeleted:
      case BlobNotDeleted:
        return Conflict;
      case TooManyRequests:
        return TooManyRequests;
      case UnexpectedInternalError:
      case ChannelClosed:
      case LifeVersionConflict:
      case BlobCorrupted:
      default:
        return InternalServerError;
    }
  }
Gets the RestServiceErrorCode that corresponds to the {@code routerErrorCode}.
@param routerErrorCode input {@link RouterErrorCode}.
@return the RestServiceErrorCode that the {@code routerErrorCode} belongs to.
ambry-api/src/main/java/com/github/ambry/rest/RestServiceErrorCode.java