Skip to content

Add try-catch for JSON parsing in proxy convention #20

Description

@todo-mdx

If upstream returns malformed JSON with application/json content-type, the proxy throws an unhandled error.

Location: src/conventions/proxy.ts lines 68-76

TDD Steps:

  • RED: Write test with mock upstream returning invalid JSON with json content-type
  • GREEN: Wrap response.json() in try-catch, return 502 with error details
  • REFACTOR: Consider similar handling in other conventions

Activity

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

    P2bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions