Improved error message when no status code