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

Validation errors don't get passed for resource_type #76

Closed
tmorrell opened this issue Mar 11, 2020 · 3 comments · Fixed by #82
Closed

Validation errors don't get passed for resource_type #76

tmorrell opened this issue Mar 11, 2020 · 3 comments · Fixed by #82
Assignees

Comments

@tmorrell
Copy link
Contributor

Typically when one creates a record with an incorrect field a validation error with helpful message is returned:

e.g. 'titles': [{'title': 'A Romans story', 'type': 'Otherss', 'lang': 'eng'}] returns an errors field that includes Invalid title type. Otherss not one of MainTitle, AlternativeTitle, Subtitle, TranslatedTitle, Other

However when one provides an incorrect resource_type in either the type or subtype field no errors field is returned:

e.g. 'resource_type': {'type': 'imagess', 'subtype': 'photo'} only returns {"status": 400, "message": "Validation error."}

@fenekku fenekku added this to To Do in InvenioRDM March Board via automation Mar 13, 2020
@fenekku fenekku self-assigned this Mar 18, 2020
@fenekku fenekku moved this from To Do to In Progress in InvenioRDM March Board Mar 19, 2020
@fenekku
Copy link
Contributor

fenekku commented Mar 23, 2020

@tmorrell To double-check: is the main issue the helpful list or a missing message in 'errors' ?

@tmorrell
Copy link
Contributor Author

tmorrell commented Mar 23, 2020 via email

@fenekku
Copy link
Contributor

fenekku commented Mar 23, 2020

Got it. Thanks!

@fenekku fenekku moved this from In Progress to In Review in InvenioRDM March Board Mar 23, 2020
InvenioRDM March Board automation moved this from In Review to Done Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants