Skip to content

Exception thrown when response payload is a plain string. #55

@emilianotisato

Description

@emilianotisato

In all cases we are assuming that the response payload to pars with Styde\Enlighten\Models\ReplacesValues trait is either null or an object/array. But when we are returning just a plain string like:

        return response()->json('Unsubscription was successfully', 200);

You can reproduce this by returning this response from a tested controller.

We expect to see the json response message even if is only a plain text (and not an object or array).

(in the attached image you will see some ray() calls coz I was debugging it.

Screen Shot 2021-03-06 at 9 22 44

Metadata

Metadata

Assignees

No one assigned

    Labels

    Next ReleaseReady to include in the next releasebugSomething isn't working

    Type

    No type
    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