You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My team has noticed that calling ToReturnOptionObject() clears any values set in errorcode or errormessage. That may be the intended behavior, but it was definitely unexpected. I would expect to need to set errorcode 0 or the equivalent enum value to clear those fields. What do you think about not clearing them unless error code 0 is specified?
The text was updated successfully, but these errors were encountered:
You are correct. The default method was envisioned a convenient way to return a successful response with the parameterized override allowing for setting other error codes or messages. I had not considered that the error code and message would have been set prior to this step.
I agree that this assumption is incorrect and that this method should not overwrite the existing values if present. However, something worth considering is whether the ToReturnOptionObject() is still needed in this use case if it has already been configured for return.
The ToReturnOptionObject() method performs the following actions to prepare the OptionObject for return:
Clones the OptionObject.
Removes unedited rows to trim down the payload and address some errors previously seen in the myAvatar UI in testing.
Sets the ErrorCode and ErrorMesg.
I suspect in this use case the method is still valuable for step 2 despite step 3 being handled earlier in the process.
Yes, since the guidance given in training is to return an optionobject
containing only the items you wish to change, I think step 2 is still
important.
On Sat, Jan 28, 2023, 12:54 PM Scott Olson Jr ***@***.***> wrote:
You are correct. The default method was envisioned a convenient way to
return a successful response with the parameterized override allowing for
setting other error codes or messages. I had not considered that the error
code and message would have been set prior to this step.
I agree that this assumption is incorrect and that this method should not
overwrite the existing values if present. However, something worth
considering is whether the ToReturnOptionObject() is still needed in this
use case if it has already been configured for return.
The ToReturnOptionObject() method performs the following actions to
prepare the OptionObject for return:
1. Clones the OptionObject.
2. Removes unedited rows to trim down the payload and address some
errors previously seen in the myAvatar UI in testing.
3. Sets the ErrorCode and ErrorMesg.
I suspect in this use case the method is still valuable for step 2 despite
step 3 being handled earlier in the process.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWTCEJ2L2DIXSGPXABWWYTTWUVMMFANCNFSM6AAAAAAUETGS4M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
My team has noticed that calling ToReturnOptionObject() clears any values set in errorcode or errormessage. That may be the intended behavior, but it was definitely unexpected. I would expect to need to set errorcode 0 or the equivalent enum value to clear those fields. What do you think about not clearing them unless error code 0 is specified?
The text was updated successfully, but these errors were encountered: