Skip to content

Debug option for responses from networks #142

@davidsneighbour

Description

@davidsneighbour

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 :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions