The PIDField component doesn't display errors when you click save for the first time
Steps to Reproduce
Go to '/uploads/new'
Fill in a random value as an external DOI e.g 1234
Click on Save draft
See the errors in the top section and specifically the DOI: invalid scheme
Notice that the PIDField is not in an error state.
Change the field in another invalid value and click save again.
See that now the PIDField is correctly in an error state.
Expected behavior
The component should be in an error state after the first save.
Additional context
Maybe it's worth cheking formik.setStatus() function in which you can set an arbitrary state e.g backendErrors. That way, we can distinguish backend from frontend errors. To evaluate the extend of changes needed.
Package version:
RDM@v7.0
Describe the bug
The
PIDField
component doesn't display errors when you click save for the first timeSteps to Reproduce
Save draft
DOI: invalid scheme
PIDField
is not in an error state.Expected behavior
The component should be in an error state after the first save.
Additional context
Maybe it's worth cheking
formik.setStatus()
function in which you can set an arbitrary state e.gbackendErrors
. That way, we can distinguish backend from frontend errors. To evaluate the extend of changes needed.