I am unable to raise exceptions correctly in my flask app : <p>In my flask app, I am unable to throw an error due to the following line of code.</p>

<p>Note that MyException is a class that is subclass of the Exception class, and it imports status from the flask_api.</p>

<pre><code>raise MyException(
            status.HTTP_400_BAD_REQUEST, "File does not exist: " + file_path
        )
</code></pre>

<p>However, this yields the following error in my terminal when I get to this error in my webpage:</p>

<pre><code>TypeError: 'tuple' object is not callable
The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a tuple.
</code></pre>

<p>Am I unable to raise exceptions in flask?</p>
