Logo DataHubClient

DataHubError Type

Base error for every failed DataHub operation. Wraps the raw HTTP status and body so callers get a consistent, cross-language error shape instead of a target-specific HTTP exception.

Constructors

Constructor Description

DataHubError(statusCode, message, body)

Full Usage: DataHubError(statusCode, message, body)

Parameters:
    statusCode : int
    message : string
    body : string

Returns: DataHubError
statusCode : int
message : string
body : string
Returns: DataHubError

Instance members

Instance member Description

this.Body

Full Usage: this.Body

Returns: string

The raw response body, preserved for diagnostics.

Returns: string

this.StatusCode

Full Usage: this.StatusCode

Returns: int

The HTTP status code returned by the DataHub.

Returns: int

Static members

Static member Description

DataHubError.FromResponse(response)

Full Usage: DataHubError.FromResponse(response)

Parameters:
    response : HttpResponse - The failed HTTP response to classify.

Returns: DataHubError An UnauthorizedError, NotFoundError, RateLimitedError, ServerError, or a plain DataHubError.

Maps an unsuccessful HttpResponse to the most specific error subclass.

response : HttpResponse

The failed HTTP response to classify.

Returns: DataHubError

An UnauthorizedError, NotFoundError, RateLimitedError, ServerError, or a plain DataHubError.

Type something to start searching.