catch error status 400 code example

Example 1: webhook error 400

# if there is any empty string it returns Error: 400 Client Error: Bad Request for url: ...
message = '   ' 
webhook.add_field(name='Nachricht:', value=message)

Example 2: 400 http

400 Bad Request 

The HyperText Transfer Protocol (HTTP) 400 Bad Request 
response status code indicates that the server cannot or will not 
process the request due to something that is perceived to be a client error
(e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Tags:

Misc Example