Definitions of the error codes that are related to JSONStore.
- -100 UNKNOWN_FAILURE
- Unrecognized error.
- -75 OS_SECURITY_FAILURE
- This error code is related to the requireOperatingSystemSecurity flag.
It can occur if the destroy API
fails to remove security metadata that is protected by operating system
security (Touch ID with passcode fallback), or the init or open APIs
are unable to locate the security metadata. It can also fail if the
device does not support operating system security, but operating system
security usage was requested.
- -50 PERSISTENT_STORE_NOT_OPEN
- JSONStore is closed. Try calling the open method
in the JSONStore class class first to enable access
to the store.
- -48 TRANSACTION_FAILURE_DURING_ROLLBACK
- There was a problem with rolling back the transaction.
- -47 TRANSACTION_FAILURE_DURING_REMOVE_COLLECTION
- Cannot call removeCollection while
a transaction is in progress.
- -46 TRANSACTION_FAILURE_DURING_DESTROY
- Cannot call destroy while
there are transactions in progress.
- -45 TRANSACTION_FAILURE_DURING_CLOSE_ALL
- Cannot call closeAll while
there are transactions in place.
- -44 TRANSACTION_FAILURE_DURING_INIT
- Cannot initialize a store while there are transactions in progress.
- -43 TRANSACTION_FAILURE
- There was a problem with transactions.
- -42 NO_TRANSACTION_IN_PROGRESS
- Cannot commit to rolled back a transaction when there is no transaction
is progree.
- -41 TRANSACTION_IN_POGRESS
- Cannot start a new transaction while another transaction is in
progress.
- -40 FIPS_ENABLEMENT_FAILURE
- Something is wrong with FIPS.
- -24 JSON_STORE_FILE_INFO_ERROR
- Problem getting the file information from the file system.
- -23 JSON_STORE_REPLACE_DOCUMENTS_FAILURE
- Problem replacing documents from a collection.
- -22 JSON_STORE_REMOVE_WITH_QUERIES_FAILURE
- Problem removing documents from a collection.
- -21 JSON_STORE_STORE_DATA_PROTECTION_KEY_FAILURE
- Problem storing the Data Protection Key (DPK).
- -20 JSON_STORE_INVALID_JSON_STRUCTURE
- Problem indexing input data.
- -12 INVALID_SEARCH_FIELD_TYPES
- Check that the types that you are passing to the searchFields are stringinteger,number,
orboolean.
- -11 OPERATION_FAILED_ON_SPECIFIC_DOCUMENT
- An operation on an array of documents, for example the replace method
can fail while it works with a specific document. The document that
failed is returned and the transaction is rolled back. On Android,
this error also occurs when trying to use JSONStore on unsupported
architectures.
- -10 ACCEPT_CONDITION_FAILED
- The accept function that the user provided returned false.
- -9 OFFSET_WITHOUT_LIMIT
- To use offset, you must also specify a limit.
- -8 INVALID_LIMIT_OR_OFFSET
- Validation error, must be a positive integer.
- -7 INVALID_USERNAME
- Validation error (Must be [A-Z] or [a-z] or [0-9] only).
- -6 USERNAME_MISMATCH_DETECTED
- To log out, a JSONStore user must call the closeAll method
first. There can be only one user at a time.
- -5 DESTROY_REMOVE_PERSISTENT_STORE_FAILED
- A problem with the destroy method
while it tried to delete the file that holds the contents of the store.
- -4 DESTROY_REMOVE_KEYS_FAILED
- Problem with the destroy method
while it tried to clear the keychain (iOS) or
shared user preferences (Android).
- -3 INVALID_KEY_ON_PROVISION
- Passed the wrong password to an encrypted store.
- -2 PROVISION_TABLE_SEARCH_FIELDS_MISMATCH
- Search fields are not dynamic. It is not possible to change search
fields without calling the destroy method
or the removeCollection method
before you call the init or openmethod
with the new search fields. This error can occur if you change the
name or type of the search field. For example: {key: 'string'} to {key:
'number'} or {myKey: 'string'} to {theKey:
'string'}.
- -1 PERSISTENT_STORE_FAILURE
- Generic Error. A malfunction in native code, most likely calling
the init method.
- 0 SUCCESS
- In some cases, JSONStore native code returns 0 to indicate success.
- 1 BAD_PARAMETER_EXPECTED_INT
- Validation error.
- 2 BAD_PARAMETER_EXPECTED_STRING
- Validation error.
- 3 BAD_PARAMETER_EXPECTED_FUNCTION
- Validation error.
- 4 BAD_PARAMETER_EXPECTED_ALPHANUMERIC_STRING
- Validation error.
- 5 BAD_PARAMETER_EXPECTED_OBJECT
- Validation error.
- 6 BAD_PARAMETER_EXPECTED_SIMPLE_OBJECT
- Validation error.
- 7 BAD_PARAMETER_EXPECTED_DOCUMENT
- Validation error.
- 8 FAILED_TO_GET_UNPUSHED_DOCUMENTS_FROM_DB
- The query that selects all documents that are marked dirty failed.
An example in SQL of the query would be: SELECT * FROM [collection]
WHERE _dirty > 0.
- 9 NO_ADAPTER_LINKED_TO_COLLECTION
- To use functions like the push and load methods
in the JSONStoreCollection class, an adapter must
be passed to the init method.
- 10 BAD_PARAMETER_EXPECTED_DOCUMENT_OR_ARRAY_OF_DOCUMENTS
- Validation error
- 11 INVALID_PASSWORD_EXPECTED_ALPHANUMERIC_STRING_WITH_LENGTH_GREATER_THAN_ZERO
- Validation error
- 12 ADAPTER_FAILURE
- Problem calling WL.Client.invokeProcedure, specifically
a problem in connecting to the MobileFirst Server adapter.
This error is different from a failure in the adapter that tries to
call a backend.
- 13 BAD_PARAMETER_EXPECTED_DOCUMENT_OR_ID
- Validation error
- 14 CAN_NOT_REPLACE_DEFAULT_FUNCTIONS
- Calling the enhance method
in the JSONStoreCollection class to replace an existing
function (find and add)
is not allowed.
- 15 COULD_NOT_MARK_DOCUMENT_PUSHED
- Push sends the document to an adapter but JSONStore fails
to mark the document as not dirty.
- 16 COULD_NOT_GET_SECURE_KEY
- To initiate a collection with a password there must be connectivity
to the MobileFirst Server because
it returns a 'secure random token'. IBM® Worklight® V5.0.6
and later allows developers to generate the secure random token locally
passing {localKeyGen: true} to the init method
via the options object.
- 17 FAILED_TO_LOAD_INITIAL_DATA_FROM_ADAPTER
- Could not load data because WL.Client.invokeProcedure called
the failure callback.
- 18 FAILED_TO_LOAD_INITIAL_DATA_FROM_ADAPTER_INVALID_LOAD_OBJ
- The load object that was passed to the init method
did not pass the validation.
- 19 INVALID_KEY_IN_LOAD_OBJECT
- There is a problem with the key used in the load object when you
call the add method.
- 20 UNDEFINED_PUSH_OPERATION
- No procedure is defined for pushing dirty documents to the server.
For example: the init method (new
document is dirty, operation = 'add') and the push method
(finds the new document with operation = 'add') were called, but no
add key with the add procedure was found in the adapter that is linked
to the collection. Linking an adapter is done inside the init method.
- 21 INVALID_ADD_INDEX_KEY
- Problem with extra search fields.
- 22 INVALID_SEARCH_FIELD
- One of your search fields is invalid. Verify that none of the
search fields that are passed in are _id,json,_deleted,
or _operation.
- 23 ERROR_CLOSING_ALL
- Generic Error. An error occurred when native code called the closeAll method.
- 24 ERROR_CHANGING_PASSWORD
- Unable to change the password. The old password passed was wrong,
for example.
- 25 ERROR_DURING_DESTROY
- Generic Error. An error occurred when native code called the destroy method.
- 26 ERROR_CLEARING_COLLECTION
- Generic Error. An error occurred in when native code called the removeCollection method.
- 27 INVALID_PARAMETER_FOR_FIND_BY_ID
- Validation error.
- 28 INVALID_SORT_OBJECT
- The provided array for sorting is invalid because one of the JSON
objects is invalid. The correct syntax is an array of JSON objects,
where each object contains only a single property. This property searches
the field with which to sort, and whether it is ascending or descending.
For example: {searchField1 : ∾€œASC∾€�}.
- 29 INVALID_FILTER_ARRAY
- The provided array for filtering the results is invalid. The correct
syntax for this array is an array of strings, in which each string
is either a search field or an internal JSONStore field. For more
information, see Store internals.
- 30 BAD_PARAMETER_EXPECTED_ARRAY_OF_OBJECTS
- Validation error when the array is not an array of only JSON objects.
- 31 BAD_PARAMETER_EXPECTED_ARRAY_OF_CLEAN_DOCUMENTS
- Validation error.
- 32 BAD_PARAMETER_WRONG_SEARCH_CRITERIA
- Validation error.