Skip to content

fix(synkronus): return JSON content type for user list - #1028

Merged
najuna-brian merged 3 commits into
OpenDataEnsemble:devfrom
Grace256c:fix/synkronus-cli-user-list-response
Oct 26, 2026
Merged

najuna-brian merged 3 commits into
OpenDataEnsemble:devfrom
Grace256c:fix/synkronus-cli-user-list-response

Conversation

@Grace256c

Copy link
Copy Markdown
Contributor

What & Why

Fixes synk user list reporting a successful response as an API error.

The Synkronus GET /api/users handler returned a valid JSON array but did not set Content-Type: application/json. The generated CLI client only parses the HTTP 200 response into JSON200 when the response content type is JSON, so the successful response was left unparsed and treated as an API error.

This PR updates the server handler to return the correct JSON content type and adds regression coverage for both the server response and the CLI client parsing path.

Closes #1021.

Type of Change

  • Bug fix
  • New feature / enhancement
  • Refactor / cleanup
  • Documentation
  • Chore / other

Component(s) Changed

  • formulus (React Native mobile app)
  • formulus-formplayer (form WebView UI)
  • synkronus (Go backend)
  • synkronus-cli (command-line client)
  • synkronus-portal (web admin UI)
  • desktop (Tauri app)
  • packages (tokens / components)
  • Documentation / DevOps / CI

Testing

  • Added/updated tests
  • Manually tested
  • Not applicable

Checklist

@Mishael-2584 Mishael-2584 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Grace256c. The fix addresses the cause correctly: returning application/json allows the generated CLI client to parse the successful user-list response.

I ran both new regression tests against 06ba969, and both passed. They cover the server’s content-type header and successful parsing through Client.ListUsers(). CI is also green.

LGTM

@najuna-brian
najuna-brian merged commit b41e745 into OpenDataEnsemble:dev Oct 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[synkronus-cli] synk user list reports a successful response as an error

3 participants