httpclient: handle expected django errors