MuleSoft · Object Store Connector

OS:KEY_NOT_FOUND

Short answer

OS:KEY_NOT_FOUND means an Object Store Retrieve or Remove operation asked for a key that has no value in the store. Check that the key exists first with Contains, or give Retrieve a default value.

VerifiedLast verified

01Error text

MuleSoft error
Error type: OS:KEY_NOT_FOUND

02Likely causes

  • Remove: no value exists for the key.
  • Retrieve: no value exists for the key, and the default value parameter was not provided or resolved to null.

03How to fix it

  1. Confirm that the Store and the Retrieve or Remove operation use the same key expression and the same object store.
  2. Give the Retrieve operation a default value, which it returns when the key is absent.
  3. Or call the Contains operation first and only retrieve or remove the key when it is present.
  4. Handle the failure with an error handler of type OS:KEY_NOT_FOUND when a missing key is a normal case, such as a first run.

iNotes

The same connector throws OS:KEY_ALREADY_EXISTS from Store when Fail If Present is true and the key is already in the store, and OS:NULL_VALUE when the value is null and Fail On Null Value keeps its default of true.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.