Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhis2: expose the underlying request in debug mode #541

Open
josephjclark opened this issue May 7, 2024 · 0 comments
Open

dhis2: expose the underlying request in debug mode #541

josephjclark opened this issue May 7, 2024 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

josephjclark commented May 7, 2024

dhis2 can be very hard to debug when things go wrong, and there's some uncertainty about what's happening under the hood when calling out to a dhis2 function.

A really useful debugging tool would be to SOMEHOW log the actual HTTP request that gets sent to dhis2.

By the same token, it may be useful to see the actual raw response as well.

Assorted notes

  • dhis2 does a lot of work to scrub sensitive values. How can we override that when working in the CLI? Would we want to push the same option to lightning? This would have to be an explicit opt-in designed for debugging
  • The request and response may be large and it can be hard to read and manipulate these data structures in stdout. What, if anything, can we do about that?
  • What IS the request and response? A JSON object? A curl compatible string?
  • Serialisation is a fairly big worry - first off request and response objects have a lot of junk which just clutters the output (right now we get a lot of internal axios noise and circular structures), and secondly any data structures in there which don't serialise well - include stuff like dates or sets - will be lost when we serialize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

No branches or pull requests

1 participant