Skip to main content

Error handling

The SDK translates each HTTP error code into a nested subclass of MarkpdfException (RuntimeException).

Exceptions table

Todas extienden MarkpdfException y exponen:
##Catch specific exceptions

Automatic retries

The internal HttpClient automatically retries:
  • 429 and 5xx: retries with exponential backoff and jitter. Honor Retry-After if the server sends it.
  • 4xx different from 429: not retried.
  • Network/timeout errors: retried same as 5xx.

Job falvavalid

JobFailedException means that the job has already exhausted internal server retries. Retrying from the client is reasonable, but do it with backoff.

With CompletableFuture

Exceptions thrown by async methods are wrapped in CompletionException; unwrap with getCause():