Skip to main content

Error handling

The package translates each HTTP error code into a subclass of MarkpdfException.

Exceptions table

Todas extienden MarkpdfException y exponen:
##Catch specific exceptions

Automatic 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.
Disable packet retries:

Job falvavalid

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

Show errors in the UI

Common pattern for translating exceptions from SDK to friendly messages on Widget: