|
Post by AMI_SzuJin on Jun 9, 2022 9:05:13 GMT
Hi,
One doubt about POST without required properties. For example, Create an account without "Password" property: Body in request: { "UserName":"testuser", "RoleId":"Administrator" }
Or Create a session without "Password" property Body in request: { "UserName":"testuser" }
Which error message returned is better? "PropertyMissing" or "CreateFailedMissingReqProperties"?
Thanks, SzuJin
|
|
|
Post by mraineri on Jun 9, 2022 13:43:59 GMT
Both messages work, but "CreateFailedMissingReqProperties" is more specific for this scenario and I would recommend it over "PropertyMissing".
Reading the text for both messages, I'm wondering if we intended to have these two messages. It looks like both messages have been around since version 1.0.0 of the Base Message Registry. I certainly cannot think of a reason to use one over the other at this time, and I think this should be discussed with others.
|
|
|
Post by AMI_SzuJin on Jun 10, 2022 7:43:25 GMT
Hi, Thanks for the reply. One more question. If POST SimpleUpdate action without required property, which error message you suggest?
Thanks, SzuJin
|
|
|
Post by mraineri on Jun 13, 2022 13:04:22 GMT
Action parameters have their own messages. "ActionParameterMissing" would be the most appropriate for this case.
|
|
|
Post by AMI_SzuJin on Jun 14, 2022 3:18:04 GMT
Got it, thanks.
|
|