Skip to content

TypeError crash when parsing malformed JSON response #259

@stranske

Description

@stranske

Bug Report

Describe the bug
Application crashes with TypeError when the external API returns malformed JSON.

To Reproduce

  1. Make request to /api/data endpoint
  2. Backend receives invalid JSON from upstream service
  3. Application throws TypeError: Cannot read property 'data' of undefined

Expected behavior
Application should handle malformed responses gracefully and return an appropriate error message.

Stack trace

TypeError: Cannot read property 'data' of undefined
    at parseResponse (src/api/parser.js:45)
    at handleRequest (src/api/handler.js:123)

Test Case: Suite D Re-validation #1 - Clear BUG. Should get ONLY bug label.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requestinvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions