[英]How to view details for error message "Bad Request" for Query API
Is there a way to see error details for debugging requests to the Query API?有没有办法查看调试查询 API 请求的错误详细信息?
I am using OkHttpClient to make POST calls to the search endpoint.我正在使用 OkHttpClient 对搜索端点进行 POST 调用。
I am getting the following error message:我收到以下错误消息:
Bad Request
However, there are no other details in the error message returned by Vespa for trying to debug the error.但是,Vespa 返回的错误消息中没有其他详细信息,用于尝试调试错误。
I also tried using the vespa-logfmt CLI tool, but there were no other error messages on in the server logs indicating what went wrong with the request.我还尝试使用 vespa-logfmt CLI 工具,但服务器日志中没有其他错误消息表明请求出了什么问题。
Sorry, I was able to figure this out on my own.对不起,我能够自己解决这个问题。 It ended up being an issue with OkHttp rather than Vespa.它最终成为 OkHttp 而不是 Vespa 的问题。
I was using Response.message, but I needed to actually use Response.body().string() to see the full error output.我使用的是 Response.message,但我需要实际使用 Response.body().string() 来查看完整的错误输出。
Apologies for the confusion.为混乱道歉。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.