Added code snippet using HTTPException