422 error code for old records in get /record/{recrod-id}
name: API Issue - 422 error code for get record
about: get /record/{record-id}
title: "[API]: 422 error code for old records in get /record/{recrod-id}"
labels: "api"
assignees: ''
title: "feat(api): "
🔌 API Issue
Describe the API issue
The get /record/{record-id} endpoint is returning 422 error for old records due to validations the valiawhich we have applied mid way.
The RecordRead schema also has the same strict validations as the RecordCreate scehma which is invalidating the old records which do not follow the validations set thus causing 422 unprocessible content error as the response.
I think we have to either change the RecordRead schema to lighthen the validations or update the get /record/{record-id} route to have a more graceful handling where validations fail and it still returns the record data.
API Endpoint (if applicable)
get /record/{record-id}
Request/Response examples (if applicable)
Provide examples of the request and response that illustrate the issue.
Expected behavior
Returns the record content even for old records which are not valid according to the present validations.
Additional context
Add any other context about the API issue here.
📌 Follow semantic issue titling convention:<type>(<scope>): <description>(e.g.,feat(api): add user registration endpointorfix(records): handle null values).