Skip to content

Move resolveOrRespond out of the pure mapping module #32

Closed

Description

@lmcorbalan

User story / Problem statement

Currently resolveOrRespond lives in the otherwise-pure mapping module, where it imports the Express Response type and writes to the response object. This is a layering smell: a side-effecting HTTP responder sitting inside the module that is supposed to hold pure data mapping, and it forces an Express dependency on code that has no other reason to know about HTTP.

Expected outcome

The mapping module is free of Express entirely. The responder lives beside the other route-level HTTP helpers, where a reader looking for response-writing code expects to find it.

Acceptance criteria

  • resolveOrRespond moves to a routes-level module next to the other Express-touching helpers
  • The mapping module no longer imports anything from Express
  • All call sites are rewired, with no behavior change and no new tests needed
  • The suite is green

Technical notes

Pure move, no behavior change. Keep the comment explaining why the 409 on the standard endpoints is deliberate, since this becomes its single documented home.

Additional context

Part of #22. Implemented by #12.

Activity

  1. lmcorbalan commented on Jul 22, 2026

    @lmcorbalan
    CollaboratorAuthor

    Delivered by #12, merged 2026-07-21, before issue tracking was set up on this repo. Recorded here for traceability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions