Error handling
With useConvertFile
The hook never throws inside the component — errors remain in the error state field, as instances of MarkpdfError (the same class as SDK base):
convert() also rejects the promise it returns, so you can capture it there if you prefer try/catch instead of reading error from the state:
With raw client (useMarkpdf)
The useMarkpdf() methods (convertFile, convertFromUrl, convertStream, pdfIndex, getJob) launch typed subclasses of MarkpdfError, just as in Node.js:
@markpdf/react re-exports the same classes.
