Debug option for responses from networks

Open
#142 4 comments 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

Assessment

This issue has not been assessed yet.

Description

I am currently setting up various strategies, but I'm having trouble getting my Bluesky integration to work. It would be nice if crosspost --verbose or some other option would be available that might print a readable output of the response from the network:

> crosspost --bluesky "Testing"
❌ Bluesky failed.
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:6223:19)
    at successSteps (node:internal/deps/undici/undici:6204:27)
    at readAllBytes (node:internal/deps/undici/undici:5173:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

The above is what I get when I call. I assume an error page is returned, but I don't know its content at this point. Is there an easy way to somehow log (either into the terminal or a logfile) what the responses are?

Regarding the Bluesky issue, I assume it's the IDENTIFIER for my user. The docs are not very clear about what identifier that is (Username with or without @, DID from Bluesky). We cross that bridge when we come to it :)

Dominant language
JavaScript
Stars
576
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from humanwhocodes/crosspost

All issues in humanwhocodes/crosspost

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.