Skip to content

Exceptions

All SDK exceptions inherit from ResumlyError. Catch specific exceptions for fine-grained error handling.

Exceptions raised by the Resumly SDK.

ResumlyError

ResumlyError(message: str, status_code: int = None, response: dict = None)

Bases: Exception

Base exception for all Resumly SDK errors.

message instance-attribute

message = message

status_code instance-attribute

status_code = status_code

response instance-attribute

response = response

AuthenticationError

AuthenticationError(message: str, status_code: int = None, response: dict = None)

Bases: ResumlyError

Raised when the API key is invalid or missing (HTTP 401).

RateLimitError

RateLimitError(message: str = 'Rate limit exceeded', retry_after: int = None, **kwargs)

Bases: ResumlyError

Raised when the API rate limit is exceeded (HTTP 429).

The client retries 429s automatically (honoring Retry-After); this is raised only after retries are exhausted. retry_after holds the server's suggested wait in seconds when provided.

retry_after instance-attribute

retry_after = retry_after

InsufficientCreditError

InsufficientCreditError(message: str = 'Insufficient API credit', balance_usd: float = None, price_usd: float = None, operation: str = None, **kwargs)

Bases: ResumlyError

Raised on HTTP 402 — your API wallet balance is below the operation price.

Attributes:

Name Type Description
balance_usd float or None

Current wallet balance, parsed from the error payload when present.

price_usd float or None

Price of the attempted operation.

operation str or None

The metered operation that was refused.

Top up with meth:`resumly.Resumly.buy_credit` or in the dashboard
(Settings → API).

balance_usd instance-attribute

balance_usd = balance_usd

price_usd instance-attribute

price_usd = price_usd

operation instance-attribute

operation = operation

DuplicateRequestError

DuplicateRequestError(message: str, status_code: int = None, response: dict = None)

Bases: ResumlyError

Raised on HTTP 409 — duplicate request.

Either the X-Idempotency-Key you supplied was already used for this operation (you were not charged twice), or the resource already exists (e.g. importing a job URL that is already in your feed).

InsufficientCreditsError

InsufficientCreditsError(message: str, status_code: int = None, response: dict = None)

Bases: ResumlyError

Legacy 0.x name (HTTP 403 in the internal client). Kept for backward-compatible imports; the public 1.x client raises :class:InsufficientCreditError on HTTP 402 instead.

NotFoundError

NotFoundError(message: str, status_code: int = None, response: dict = None)

Bases: ResumlyError

Raised when the requested resource is not found (HTTP 404).

ValidationError

ValidationError(message: str, status_code: int = None, response: dict = None)

Bases: ResumlyError

Raised when the request payload fails validation (HTTP 422).