Skip to content

completeErrorResponse function should stringify response before assigning it to Error in request #2802

Open
@boazblake

Description

@boazblake

Mithril.js version:
2.2.2
Browser and OS:
Chrome, Safari

The BAAS that I am using is sending an error object response that is not in the way completeErrorResponse is expecting.

It seems like completeErrorResponse is expecting the response to be a string but in my case the response is an object. Since new Error expects a string, wh3en completeErrorResponse assigns the error response to new error, it is no longer accessable, as when attempting to parse it, I get [object Object]

Screen Shot 2022-09-17 at 2 50 19 PM

Screen Shot 2022-09-17 at 2 51 14 PM

Metadata

Metadata

Assignees

Labels

Area: CoreFor anything dealing with Mithril core itselfType: BugFor bugs and any other unexpected breakage

Type

No type

Projects

Status

Low priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions