diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index 91d3352cc8fcf5..9391ee586e3eb6 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -331,6 +331,10 @@ CHIP_ERROR ESP32Utils::MapError(esp_err_t error) { return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; } + if (error == ESP_ERR_NVS_INVALID_LENGTH) + { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } return CHIP_ERROR(ChipError::Range::kPlatform, error); }