Edge cases management for get concrete version endpoints

Pawel Bartkowiak
2026-03-31T14:44:36Z

#### **Case 1: Large numbers as version**

Version number consisting of 20 digits or more generates following error with doubled status code in message and not properly displayed error message:

```json
{
"code": 424,
"reason": "{\"type\": \"about:blank\", \"title\": \"Bad Request\", \"status\": 400, \"detail\": \"Failed to convert 'version' with value: '12345678901234567890'\", \"instance\": \"/api/storage/v2/records/osdu%3Awork-product-component--SaturationFunctionSet%3AsaturationAutoTest62412180/12345678901234567890\"}"
}
```

#### **Case 2: Small numbers as version**

Very small numbers points to random version of the record:

For example for record with 4 versions:

* 0-10 - the first version (the oldest)
* 11 -\> Record version not found
* 12 -\> the second version
* 13 -\> the first version (the oldest)
* 14 -\> the first version (the oldest)
* 15 -\> the fourth version (the latest)
* 16 -\> Record version not found
* 17 -\> the first version (the oldest)
* 18 -\> the second version
* 19 and 20 -\> Record version not found
* 21 -\> the second version

Both cases are generic and reproducible for all schema types.