Skip to content

literaturesuggest: avoid crash when record is invalid #2707

Open
@jmartinm

Description

@jmartinm

If a user submits an invalid record from the form, for example, with 2 duplicated authors then the submit handler will crash here and the user will get a 500 error page.

Instead, we should validate the record early on here and don't submit if the record has some invalid content.

A generic error can be shown to the user alerting that there is a problem with the data and to report it to developers (or if it is worth the time spent, parse the validation error, and do something smarter on the UI side to show exactly the error.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions