Catch HTTPException in run file