Skip to content

JsonApiException namespace issue #638

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

Closed
wisepotato opened this issue Nov 27, 2019 · 1 comment · Fixed by #714
Closed

JsonApiException namespace issue #638

wisepotato opened this issue Nov 27, 2019 · 1 comment · Fixed by #714

Comments

@wisepotato
Copy link
Contributor

The current JsonApiException is situated in the JsonApiDotNetCore.Internal namespace, it should be in the JsonApiDotNetCore.Internal.Exceptions, as we have a folder for that.

As discussed in #620, where we discussed that namespaces are a bit of a mess at the moment, we should take some time to correct this.

@bart-degreed
Copy link
Contributor

As part of #714, I have added several custom exceptions that derive from JsonApiException, to help in properly building Error objects that are json:api spec compliant. For example, Title must contain a generic message, while Detail must be case-specific.

I moved JsonApiException and derived classes into a public namespace, so that custom implementations can throw them instead of creating error objects themselves (which is still possible, by the way). I also moved Error and related types into the public Models namespace and added missing fields to make then json:api compliant.

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

Successfully merging a pull request may close this issue.

2 participants