Slightly more useful exception handling for non-json