handle unsuccessful, non-json responses