阅读背景:

Django REST框架中的错误处理 - 返回空文件而不是错误视图

来源:互联网 

I have a piece of code in a Django REST framework that looks like the following. It works if the request arguments are valid, but if I specify a non-valid search keyword, the browser returns an empty python file with length of 0 bytes instead of an HTML error code. What am I doing wrong with respect to error catching?I have a piece of code in a Django REST framewo




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: