# Getting a KEY\_NOT\_FOUND\_ERROR on create, is that normal?

**URL:** https://discuss.aerospike.com/t/getting-a-key-not-found-error-on-create-is-that-normal/10687
**Category:** General Discussion
**Created:** [December 6, 2023, 4:02pm UTC](https://discuss.aerospike.com/t/getting-a-key-not-found-error-on-create-is-that-normal/10687 "2023-12-06T16:02:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Fabricio](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@Fabricio](https://discuss.aerospike.com/u/Fabricio)
#### Post date: [December 6, 2023, 4:02pm UTC](https://discuss.aerospike.com/t/getting-a-key-not-found-error-on-create-is-that-normal/10687/1 "2023-12-06T16:02:01Z")

</div>

Hi,

My project uses aerospike-client-go/v5 and I implemented a helper function `Create` that invokes client’s `Put` with `CREATE_ONLY` as `RecordExistsAction` in the `WritePolicy`.

But, surprisingly, sometimes I get the `KEY_NOT_FOUND_ERROR`. Is that something expected to happen?

---

<div class="post-metadata">

### Author: ![Fabricio](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@Fabricio](https://discuss.aerospike.com/u/Fabricio)
#### Post date: [December 8, 2023, 10:12am UTC](https://discuss.aerospike.com/t/getting-a-key-not-found-error-on-create-is-that-normal/10687/2 "2023-12-08T10:12:05Z")

</div>

Ah, I’ve just learned that the bin was empty and when that happens Aerospike understands it as a delete and it was trying to delete a record that did not exist. therefore the not found error.

All solved now 👍

---

<div class="post-metadata">

### Author: ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)
#### Post date: [March 1, 2024, 10:12am UTC](https://discuss.aerospike.com/t/getting-a-key-not-found-error-on-create-is-that-normal/10687/3 "2024-03-01T10:12:20Z")

</div>

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.
