Skip to content

dispatch() Returns Exception Object Instead of HTTP Response in BaseAPIView #9157

Description

@R0hit-Sriram

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I make any API request that triggers an unhandled exception, the server crashes the response pipeline instead of returning a structured error response and I see the error message attached below:

TypeError: 'Exception' object is not a valid HTTP response

What I expect is a properly formatted JSON error response with an appropriate HTTP status code.

File: apps/api/plane/api/views/base.py, line 126

Steps to reproduce

  1. Make any API request that raises an unhandled server-side exception
  2. Observe that the response pipeline crashes instead of returning a clean error JSON
  3. See malformed 500 with no structured body

Environment

Production

Browser

Google Chrome

Variant

Cloud

Version

v0.17.0-dev

Metadata

Metadata

Assignees

Labels

planesync issues to Plane🐛bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions