September 15, 2022

PicGo+Typora ErrorCode 422解决方案

——Error Stack Begin——
StatusCodeError: 422 - {“message”:”Invalid request.\n\n"sha" wasn’t supplied.”,”documentation_url”:”https://docs.github.com/rest/reference/repos#create-or-update-file-contents"}
at new StatusCodeError (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request/request.js:185:22)
at Request.emit (events.js:200:13)
at Request. (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request/request.js:1154:10)
at Request.emit (events.js:200:13)
at IncomingMessage. (/Applications/PicGo.app/Contents/Resources/app.asar/node_modules/request/request.js:1076:12)
at Object.onceWrapper (events.js:288:20)
at IncomingMessage.emit (events.js:205:15)
——-Error Stack End——-


解决方案

这是因为图床仓库里有之前验证上传的文件导致同名错误,到图床仓库里删除之前验证上传的图片即可。

这里文件名分别为icon_256x256.pngicon_512x512.png。图片为Typora的logo。

About this Post

This post is written by Andy, licensed under CC BY-NC 4.0.

#TroubleShooting