Tweak to the error handling so it reads error_code instead of "code".