What kind of logic?
The case I'm fixing is being able to access the response content (json) to get at the error message (for ybot specifically)