Appendix: Common function error codes

Error codes in PDF Builder functions

Table below lists the error codes that may be returned by a PDF Builder function (for example, a function in the PDFAttachment object).

Error Code Description
-1 Common error.
-2 Invalid object.
-3 Invalid document object.
-4 Invalid page object.
-5 Invalid text object.
-6 Invalid multi-line text object.
-7 Invalid rich text object.
-8 Invalid image object.
-9 Invalid font object.
-10 Invalid layer object.
-11 Invalid layer container.
-12 Invalid layer assembly object.
-13 Invalid index.
-14 Invalid argument.
-15 Invalid object to be imported.
-16 Invalid starting index.
-17 Invalid index scope.
-18 Invalid object name.
-19 Invalid file name.
-20 Invalid font name.
-21 Invalid visible object.
-22 Invalid password; the main password and user password cannot be null and cannot be the same.
-23 Invalid document property object.
-24 Invalid handler.
-25 Abnormal operation.
-26 Failed to open the source PDF document or the source PDF document does not exist.
-27 Failed to create the PDF document.
-28 Failed to create the multi-line text.
-29 Failed to load the font.
-30 Failed to load the image.
-31 Failed to locate the object in the page.
-32 Object does not exist.
-33 Object already has an owner.
-34 Read-only object cannot be modified.
-35 Failed to perform the XML serialization.
-36 Object not applicable to the current document format.
-37 Width not specified.
-38 Failed to initialize the dummy builder.
-39 Unsupported operation.
-40 Invalid folder name.
-41 Failed to instantiate the object.
-42 Failed to write in the file.
-43 Failed to load the file.
-44 Invalid file path.
-45 Protocol not recognized.
-46 Watermark incompatible with the attachment.
-48 Wrong or missing master password.
-49 The form object has been imported multiple times.

Error codes in RestClient functions

Table below lists the error codes that may be returned by a RestClient function.

Error Code Description
-1 Common error.
-2 Invalid URL.
-3 Cannot connect to the Internet.
-4 Timeout.
-5 Failed to get token.
-6 Failed to export JSON.
-7 Failed to decompress data.
-10 The token is invalid or has expired.
-11 The parameter is invalid.
-12 Invalid grant.
-13 Invalid SCOPE.
-14 Code conversion failed.
-15 Unsupported character set.
-16 The JSON is not a plain JSON with two-level structure.
-17 No data is inserted into the DataWindow because no key in the JSON matches any column name in it.
-18 Certification revocation checking has been enabled, but the revocation check failed to verify whether a certificate has been revoked. The server used to check for revocation might be unreachable.
-19 SSL certificate is invalid.
-20 SSL certificate was revoked.
-21 The function is unfamiliar with the Certificate Authority that generated the server's certificate.
-22 SSL certificate common name (host name field) is incorrect, for example, if you entered www.appeon.com and the common name on the certificate says www.devmagic.com.
-23 SSL certificate date that was received from the server is bad. The certificate has expired.
-24 The certificate was not issued for the server authentication purpose.
-25 The application experienced an internal error loading the SSL libraries.
-26 More than one type of errors when validating the server certificate.
-27 The server requires the client to provide a certificate.
-28 The client certificate has not been assigned with a private key.
-29 The client certificate has no accessible private key.
-30 Cannot find the specified certificate.
-31 Failed to read the certificate.
-32 The certificate password is wrong.
-33 A security error has occurred. Possible cause: The client does not support the SSL/TLS version required by the server. For example: Client does not support TLS 1.3 when server requires TLS 1.3.
-34 Response is unrecognizable. Normally this is because the HTTP version does not match with the version required by the server.
-35 This error indicates the connection with the server was reset or terminated, or an incompatible SSL/TLS protocol was encountered; for example, a mismatch between client and server TLS versions or interference by intermediary devices during the handshake can produce this error.

Error codes in WebBrowser functions

Table below lists the error codes that may be returned by a WebBrowser function.

Error Code Description
-1 Failed to execute the line.
-2 Failed to initialize the control and obtain the WebBrowser object. The WebView2 is invalid.
-4 The target path does not exist.
-5 The URI is invalid.
-6 The specified download task does not exist.
-8 The setting item does not exist.
-9 The path is invalid or does not exist.
-11 Unknown error.
-12 Invalid event name.
-14 Invalid argument.
-15 Failed to create screenshot file.
-16 There is a print job in progress, which cannot be closed.
-17 Could not find the corresponding item.