api errors [nfc]: explicit handling of `undefined`
api errors [nfc]: explicit handling of `undefined`

Explicitly handle possible undefined return from JSON.stringify.

(The many occurrences of the error message "Bad response from server:
undefined" in our Sentry logs serve as witness that this is not a
functional change.)

vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile