AutoWrapper icon indicating copy to clipboard operation
AutoWrapper copied to clipboard

Null Result when bodyText contains StatusCode

Open cuneytdogru opened this issue 3 years ago • 0 comments

When wrapped content contains StatusCode as a property, AutoWrapper deserialize it into ApiResponse class and changes the real status code value.

For example, when return body looks like this;

{ "messageId": "XXXXXXX", "messageDateTime": "2022-05-09",
"text": "this is a test of the new texting system", "messageStatus": "message-delivered", "statusCode": "202", }

wrapper deserialze 202 as a httpResponse and final response look like this without any result;

{ "version": "1.0.0.0", "statusCode": 202, "message": "GET Request successful." }

What i see is; It should only deserialize from bodyText if bodyText contains Result property. Otherwise must create a new instance.

Maybe that is not the complete solution but fixes the problem and passes all tests.

cuneytdogru avatar May 09 '22 18:05 cuneytdogru