maxime1992 / dev-to-git

Publish a blog post (markdown file) to Dev.to from your command line or from CI with this CLI
MIT License
27 stars 13 forks source link

Error message if dev.to refuses is missing reason #27

Open daKmoR opened 3 years ago

daKmoR commented 3 years ago

I had a "bad" cover_image: foo.jpg and dev.to won't let you update your content with a "bad" cover_image so I got an error...

but the error was not very helpful 😅 only after deleting all the content and each front matter entry line by line did I found out what the issue was 😅

can we improve the error message? 🙏

[DRAFT] Article "Introducing: Modern Web" encountered an error:
Error name: "HTTPError"
Error message: "Response code 422 (Unprocessable Entity)"
Error stack: "HTTPError: Response code 422 (Unprocessable Entity)
    at EventEmitter.<anonymous> (/html/web/node_modules/dev-to-git/bin/dev-to-git.umd.js:7080:23)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
maxime1992 commented 3 years ago

Hi @daKmoR I'd definitely be open for some help on that one, feel free to open a PR :)

maxime1992 commented 1 year ago

Encountered that today. I've raised an issue directly on Forem's repo as for some reason, they return a successful code even though they rejected the post or put: https://github.com/forem/forem/issues/19587. I'll try to display the body that they currently use so it's clearer