Fix string serialization error on web response failures

Addresses #51