Skip to content
ComPDF
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Definition of Error Codes

When a JSON request fails, ComPDF Self-hosted returns a normalized error response. If the PDF SDK or conversion processing engine returns a numeric business code, the service preserves it as bizCode and returns the corresponding semantic errorCode when available.

json
{
  "code": "400",
  "msg": "pageRanges contains an invalid page index",
  "data": null,
  "errorCode": "INVALID_PAGE_RANGE",
  "bizCode": 110001,
  "traceId": "3a5d0d2c1a0f4a4b"
}

Fields

FieldTypeDescription
codeStringHTTP status code as a string.
msgStringHuman-readable error message.
dataNullAlways null for errors.
errorCodeStringLocal or processing-engine semantic error code.
bizCodeNumberProcessing-engine numeric business code, when available.
traceIdStringTrace identifier, when available.
detailsAnyValidation details or extra diagnostic data.

Common Error Codes

HTTP StatuserrorCodeMeaning
400BAD_REQUEST / VALIDATION_ERROR / INVALID_REQUEST / INVALID_ARGUMENTMissing or invalid request parameters.
401UNAUTHORIZEDMissing or invalid x-api-key or admin session.
403FORBIDDEN / INVALID_TOKENAuthenticated request is not allowed or upstream token is invalid.
404NOT_FOUNDResource or task was not found.
409TASK_NOT_READY / INVALID_STATETask is not ready or is already in a terminal state.
413FILE_TOO_LARGEUploaded file exceeds the allowed size.
429CONCURRENCY_EXCEEDED / CONCURRENCY_LIMITToo many concurrent requests.
500INTERNAL_ERRORUnexpected server error.
502UPSTREAM_ERRORFile processing service returned an error or timed out.

Request Example

bash
curl -X POST "http://localhost:8080/api/v1/process/pdf/docx" \
  -H "x-api-key: your_api_key_here" \
  -F "file=@/path/to/sample.pdf" \
  -F 'options={"pageRanges":"999999"}'

Processing Engine Business Codes

bizCodeerrorCodeMeaning
100001INVALID_REQUEST / INVALID_ARGUMENTInvalid request or argument.
100002INVALID_JSONInvalid JSON in request or options.
100101INVALID_FILE_TYPEUploaded file type is not supported.
100102FILE_REQUIREDRequired file field is missing.
100103FILE_COUNT_MISMATCHFile count does not match parameters.
100104FILE_TOO_LARGEUploaded file is too large.
100105PAGE_LIMIT_EXCEEDEDPage limit exceeded.
100106INVALID_OUTPUT_FILE_NAMEOutput file name is invalid.
110001INVALID_PAGE_RANGEPage range is invalid.
110002INVALID_PAGE_INDEXPage index is invalid.
110003INVALID_RECTRectangle parameter is invalid.
110004INVALID_QUAD_RECTSQuad rectangle parameter is invalid.
110005PAGE_RANGE_EMPTYPage range resolves to no pages.
120001PASSWORD_REQUIREDPassword is required.
120002INVALID_PASSWORDPassword is invalid.
120201ICC_PROFILE_REQUIREDICC profile file is required.
120202ICC_PROFILE_INVALIDICC profile file is invalid.
130003INVALID_STATETask state does not allow this action.
190001CONVERT_FAILED / SDK_PROCESS_FAILEDConversion or SDK processing failed.
190002PDF_PASSWORD_ERRORPDF password is incorrect or missing.
190003PDF_FORMAT_ERRORPDF format is invalid or damaged.
190004PDF_SECURITY_ERRORPDF encryption is not supported.
190005OCR_FAILUREOCR processing failed.
190006JOB_TIMEOUTProcessing timed out.
190009SDK_FILE_ERRORFile cannot be opened or found.
190999UPSTREAM_ERRORUnknown processing engine error.