[native] helper to handle unexpected response
Summary: We log the same error and return the same status multiple times, so I've moved this logic to a separate helper function.
Test Plan: cargo build; this logic will get tested more by the functions that call it
Reviewers: tomek, atul, karol
Reviewed By: tomek
Subscribers: ashoat, adrian, abosh
Differential Revision: https://phab.comm.dev/D4854