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
Would it make sense that since Napping's Get() method does not allow returning Nil for a payload object, the library returns error if such response from a service is received? Right now, if service response is "null", Napping silently accepts that it's a valid JSON document, and does not fill any of the contents in provided struct.
While highly situational, today I encountered this weird behavior when 3rd party service bugged out and instead of expected response structure returned HTTP 200 with a payload "null".
The text was updated successfully, but these errors were encountered:
Interesting question. I don't have a real strong opinion on what is the most correct/desirable behavior in that situation. So I'd be happy to hear the opinions of other users.
Would it make sense that since Napping's Get() method does not allow returning
Nil
for a payload object, the library returns error if such response from a service is received? Right now, if service response is "null", Napping silently accepts that it's a valid JSON document, and does not fill any of the contents in provided struct.While highly situational, today I encountered this weird behavior when 3rd party service bugged out and instead of expected response structure returned HTTP 200 with a payload "null".
The text was updated successfully, but these errors were encountered: