Skip to content

Issue 90 let code be in error response#95

Closed
curtis741 wants to merge 4 commits intostas:masterfrom
curtis741:issue-90-let-code-be-in-error-response
Closed

Issue 90 let code be in error response#95
curtis741 wants to merge 4 commits intostas:masterfrom
curtis741:issue-90-let-code-be-in-error-response

Conversation

@curtis741
Copy link

What is the current behavior?

code is not included when using the jsonapi_errors renderer

What is the new behavior?

code is included when using render jsonapi_errors

Checklist

I couldn't actually run the tests with a clean checkout from master on 2.0.1.

Also I don't see any tests for render jsonapi_errors? maybe I'm missing it...

Please make sure the following requirements are complete:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes /
    features)
  • All automated checks pass (CI/CD)

@stas
Copy link
Owner

stas commented Aug 24, 2023

Also I don't see any tests for render jsonapi_errors? maybe I'm missing it...

Please take a look at this one:
https://github.com/stas/jsonapi.rb/blob/master/spec/errors_spec.rb

… instead of rendering a resource that had an error.
@curtis741
Copy link
Author

@stas I saw that file, all of those tests were testing the rendering of a resource that had an error. But there were no tests when you call jsonapi_error without a resource.

It's cool, I got a new test all setup so you've now got more test coverage.

@curtis741
Copy link
Author

@stas does this PR look good now?

@curtis741
Copy link
Author

@stas any feedback on this PR?

@stas stas closed this in 7a105a5 Oct 8, 2023
@curtis741
Copy link
Author

thanks @stas !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants