cloudflare - Cloudflare wrangler tail --format pretty:解析响应正文时出错
问题描述
使用时wrangler tail --format pretty
,我收到以下错误:
Error parsing response body!
This is not a problem with your worker, it's a problem with Wrangler.
Please file an issue on our GitHub page, with a minimal reproducible example of
the script that caused this error and a description of what happened.
如错误消息中所述,我很难将 JSON 从wrangler tail --format json
Github 问题上传,因为它包含整个请求详细信息,其中包括我的邮政编码、纬度、经度,尽管我不确定为什么会有这么多日志中的个人信息。
解决方案
我发现最快的解决方案是使用jq而不是使用wrangler tail --format pretty
:
在 macOS 上,
- 安装jq:
brew install jq
- 管道牧马人输出到 jq 中:
wrangler tail --env environment_name | jq
推荐阅读
- solr - Solr 7.5 中嵌套 json 对象的托管或手动编写的 schema.xml
- sql - Migrating specific entries in table to UTC
- wpf - 如何更改安装文件夹 URL 并更新 ac# 在用户计算机中单击一次应用程序的位置
- angular-material2 - 更新到角度材料 v7 后,mat-select 选项变得透明
- c - 退出程序后恢复终端输出
- angular - Angular 6通过效果rxjs传递参数
- java - Kafka:此服务器不是该主题分区的领导者
- c++ - 自一周开始以来的秒数?
- laravel - 更新数据库表列 - Laravel
- python - 如何在 Seaborn 中叠加不同类型的图表?