Skip to content

Commit

Permalink
[ESP32] Map ESP_ERR_NVS_INVALID_LENGTH to CHIP_ERROR_BUFFER_TOO_SMALL (
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp authored and pull[bot] committed Sep 29, 2023
1 parent 2d9c78c commit f27a4dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/ESP32/ESP32Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit f27a4dd

Please sign in to comment.