Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST fails for any Instance batch containing a record lacking classifications #534

Closed
banerjek opened this issue Feb 27, 2023 · 2 comments
Closed

Comments

@banerjek
Copy link
Member

If a POSTed batch of Instances contains a record with no classifications, the batch is rejected with the message:

    "errors": [         {​             "message": "must not be null",             "type": "1",             "code": "javax.validation.constraints.NotNull.message", "parameters": [                 {​                     "key": "instances[184].classifications[0].classificationNumber",                     "value": "null"                 } ​
No classification is increasingly common for certain types of records, notably electronic that will never be shelved. Suggest sending filler values -- hopefully just an empty array would do the trick

@branchedelac
Copy link
Contributor

I suspect this might be another example of #464, where the issue is that the failed record contains an object property which is missing one or more required properties.

classificationNumber is a required property of the classifications object.

At the time of writing the main branch contains changes which, in order to prevent this error when POST, clean out and report on missing required object properties. @banerjek could you try transforming one of your failing records using main and reposting?

@banerjek
Copy link
Member Author

Need to investigate further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants