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 Jul 4, 2022
1 parent fa2bf8d commit e9b49a9
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 e9b49a9

Please sign in to comment.