记一次接口调试错误: {"timestamp":"2019-09-11T03:04:30.036+0000","status":500,&q

接口测试中用postman测试返回是正常的,但是使用其他人去调用就出错了,找了半天,才想起来使用了nginx,用于端口的代理转发。然后根据错误信息发现json格式的某个字段为null,结合日志中的报文:

  {"MSG":"查询成功","OPERATE_TIME":"1568170376","STATUS":"0000","state":null}

发现state对应的值为null,所以猜测是nginx对报文做了处理。

错误如下:

{"timestamp":"2019-09-11T03:04:30.036+0000","status":500,"error":"Internal Server Error","message":"Could not write JSON: Object is null; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Object is null (through reference chain: net.sf.json.JSONObject[\"state\"]->net.sf.json.JSONNull[\"empty\"])","path":"..."}

 

上一篇:nested exception is java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is un


下一篇:在App Engine for Python中,是否可以使用嵌套在其中的另一个对象来持久化一个类?