HTTPException might be better idea IMO. It may capture more http related exceptions than just BadStatusLine