Fix url
Catch possible json decoding errors, make sure to cast block json to int
Fix error where trying to call hexdigest() method on unicode
r -> response
catch possible json decode error
call right method, raise_for_status
Use helper fail_exit method
Fix positional argument to be syntactically correct in Namespace obj