shift-org / shift-org/shift-docs

Confusing response from retrieve_event endpoint if valid secret isn't provided

Open
#568 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API backend
Dominant language
JavaScript
Stars
30
Forks
25
Avg merge
9m
Merged PRs (30d)
1

Description

If a valid secret is provided to the retrieve_event endpoint, all stored values are returned. If no secret is provided, or an invalid secret, you still get a 200 response but private fields (e.g. email) will be null. This sort of silent omission is confusing to me, and basically just defers an error until later (e.g. trying to update the event via manage_event and being told at that point that the secret is invalid).

We should just require a valid secret for this endpoint and return a 4xx error if it's not. If you just want to retrieve the public data to display the event, the event endpoint is the way to go (which does not require the event secret). Some testing would be needed to make sure some piece of the puzzle isn't relying on this quirky behavior.

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.

Research direction

Start by locating the retrieve_event endpoint and any existing tests for secret handling. Verify the current behavior for valid, missing, and invalid secrets, then add coverage for a 4xx response while confirming the public event endpoint remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.