Closed cecilia-donnelly closed 8 years ago
@slifty, @kfogel:
I think I see what's going on here but I don't know how I should address it. It looks like getCode
in YesNoReason
doesn't return a code for null input, and so lines like veteranInfo.setWorldWarIi(clientDTO.getWorldWarII().getCode());
fail to find a code and thus send the user a 500 response. Should this just be another validation, along the lines of "Input can't be null"? Or should we convert nulls to ERR_UNKNOWN
or NOT_COLLECTED
?
On the
feature-validations
branch (see PR #50), sendingnull
values for the following fields causes a server error and a 500 response.Fields:
and the server error:
I'm guessing that this may have to do with
YesNoReason
, but it looks like that should be able to handlenull
values, and store them as-1
? In any case, new clients with nulls in those fields are stored correctly. The issue is just that the server sends a 500 response, so the user wouldn't know that their POST was successful.