Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emilianotisato opened this issue Mar 6, 2021 · 0 comments · Fixed by #56
Open

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

emilianotisato opened this issue Mar 6, 2021 · 0 comments · Fixed by #56
Labels
bug Something isn't working Next Release Ready to include in the next release

Comments

@emilianotisato
Copy link
Contributor

emilianotisato commented Mar 6, 2021

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

@emilianotisato emilianotisato added the bug Something isn't working label Mar 6, 2021
@sileence sileence added the Next Release Ready to include in the next release label Mar 10, 2021
@sileence sileence reopened this Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Next Release Ready to include in the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants