Enum InstantErrorCode

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      UNKNOWN

      We don’t really know what happened.

      USER_CANCELLED

      The operation failed, because it has been cancelled.

      AUTHENTICATION_FAILED

      The process could not be completed because the authentication failed.

      This typically means either the user no longer has access to the document or the authentication token (JWT) expired. Your own server should be able to say if the user still has access. If the user still has access, obtain a new authentication token from your server and call reauthenticateWithJwtAsync on your document. If the user no longer has access, stop showing this document to the user.

      Note that the document’s storage will not be removed from disk! You can still access that document, and even continue to make edits to it. These will, however, not be synced anymore.

      You need to obtain a new authentication token, and retry your operation. Until then, anything that would hit the Instant Server (PSPDFKit Document Engine) will fail again.

      ALREADY_AUTHENTICATING

      The operation cannot be performed at this time, because the document is busy authenticating.

      You will encounter this error code when you call reauthenticateWithJwtAsync, syncAnnotationsAsync, or their synchronous counterparts on a document that is in the process of authenticating.

      ALREADY_SYNCING

      A new sync request has not been initiated because there already was one running.

      REQUEST_FAILED

      The request did not complete due to some networking problem. Most likely, the connection was interrupted.

      Note: More details can be found in the underlying error getUnderlyingError, which will be the integer representation of a HTTP error.

      OLD_CLIENT

      The operation could not be completed because the client and server have incompatible versions: the server expects a newer client. You need to update this framework in your app to a compatible version and release an update. If a user sees this on their device they need to update your app.

      OLD_SERVER

      The operation could not be completed because the client and server have incompatible versions: the client is too new for the server. The server needs to be updated to a compatible version. You should update your server before releasing the updated client to ensure this error is never encountered on users’ devices.

      INVALID_REQUEST

      The server rejected our request for a reason other than an authentication failure.

      If you ever see this error, please contact support..

      PAYLOAD_SIZE_LIMIT_EXCEEDED

      The operation could not be completed because the size of the payload sent to server is too large.

      INVALID_SERVER_DATA

      The data from the server has been ignored because it was invalid.

      If you ever see this error, please contact support..

      WRITE_FAILED

      The loaded data could not be written to disk. This can happen simply because the disk is full.

      READ_FAILED

      Reading from the filesystem failed. This can happen if the filesystem structure of the disk cache has been modified unexpectedly.

      DATABASE_ERROR

      The data could not be written to the instant database. Any other interactions with the database are likely to fail, too. If the problem persists across restarts of the app, remove this document’s local storage, and start anew.

      Note: More details can be found in the underlying error getUnderlyingError, which will be the integer SQLite error code.

      SERVER_UUID_PENDING

      The server cache could not be looked up because the server’s UUID is yet to be determined. This happens for every InstantClient in a newly installed app until it has authenticated for loading the first document.

      INVALID_JWT

      The given string is not a valid Instant JWT. It is either malformed or missing mandatory claims.

      USER_MISMATCH

      The specified user Id is incompatible with the value stored on disk.

      To prevent data corruption, Instant verifies that you do not inadvertently “switch out” the user for a document descriptor. If the JWT you used to download a layer contained the `user_id` claim, that value is stored on disk. Whenever you attempt to re-authenticate the document descriptor, Instant then compares the stored value to the value encoded in the new JWT, and will fail with this error if the values do not match up.

      ATTACHMENT_NOT_LOADED

      An attachment with the given ID does not exist in the disk cache.

      To find out whether or not the attachment actually exists, try downloading it from the server.

      NO_SUCH_ATTACHMENT

      There is no attachment with the specified ID.

      A download request for the attachment with the given ID has been rejected by the server because it does not know of such an attachment.

      ATTACHMENT_TRANSFER_IN_PROGRESS

      Internal error code — if you ever see this reported, please file a bug.

      ATTACHMENT_ALREADY_TRANSFERRED

      Internal error code — if you ever see this reported, please file a bug.

      NO_SUCH_ATTACHMENT_TRANSFER

      Internal error code — if you ever see this reported, please file a bug.

      UNMANAGED_ANNOTATION

      The operation could not be completed because the given annotation is not managed by Instant.

      INVALID_JSON_STRUCTURE

      The operation failed because a JSON structure was found to be invalid.

      This can happen if the database for a layer has been tampered with. If you see this error, please first check that you do not modify any data in the client directory of PSPDFKit Instant, and that you didn’t customise the storage location in such a way that other applications might access it. Once you ruled out this possibility and still see this error in a fresh client please contact support.

      INVALID_CUSTOM_DATA

      The operation failed because the custom data of an Instant comment was not valid JSON.

      Only JSON types (strings, numbers, booleans, nulls and arrays or dictionaries of these types) are allowed as custom data on Instant Comments.

    • Method Summary

      Modifier and Type Method Description
      static Array<InstantErrorCode> values() Returns an array containing the constants of this enum type, in the order they're declared.
      static InstantErrorCode valueOf(String name) Returns the enum constant of this type with the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • values

         static Array<InstantErrorCode> values()

        Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.

        Returns:

        an array containing the constants of this enum type, in the order they're declared

      • valueOf

         static InstantErrorCode valueOf(String name)

        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

        Returns:

        the enum constant with the specified name