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

Client/Server content type management incoherent and not compliant with JSON API spec #440

Open
gilles-gosuin opened this issue Jun 30, 2017 · 3 comments

Comments

@gilles-gosuin
Copy link

We started using the Katharsis Client in our tests and noticed something weird when trying to handle errors and map them back to the original exception.

After some debugging, we realised the client refuses to handle the server response because of a content type header mismatch: in io.katharsis.client.internal.AbstractStub:90, it expects the content type to be exactly application/vnd.api+json, whereas the server returns application/vnd.api+json;charset=UTF-8, as set in io.katharsis.spring.KatharsisFilterV2:144.

In addition to being incoherent between the client and the server, this looks non-compliant with the spec, which is very strict about how clients and servers are supposed to behave regarding content negociation.

(We're using Katharsis 3.0.2)

@gilles-gosuin gilles-gosuin changed the title Content type management not compliant with JSON API spec Client/Server content type management incoherent and not compliant with JSON API spec Jun 30, 2017
@hibaymj
Copy link
Member

hibaymj commented Jul 1, 2017

That certainly is not compliant to the spec. Could you give more information on the configuration of the framework for context?

@gilles-gosuin
Copy link
Author

gilles-gosuin commented Jul 1, 2017

Take a look at the code I mentioned; these are hardcoded constants that are not influenced by the configuration.

This is a @SpringBootApplication with the @Import(KatharsisConfigV3.class) annotation.

@ckarthik17
Copy link
Contributor

I think the pull request @ #449 should fix this issue also

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

No branches or pull requests

3 participants