HTTP Exception as control flow
As per Wikipedia , Exception handling is the process of responding to the occurrence, during computation, of exceptions – anomalous or exceptional conditions requiring special processing – often changing the flow of program execution.
In Python errors like SyntaxError, ZeroDivisionError are exceptions.Exception paves the way to alter the normal execution path.
While working with API, a web request goes through the following process,authentication, authorization, input validation, business logic and finally, the response is given out.
[Read More]