membrane / api-gateway

API gateway for REST, OpenAPI, GraphQL and SOAP written in Java.
https://membrane-api.io
Apache License 2.0
457 stars 137 forks source link

OAuth2ResourceB2C does not set ContentType for ProblemDetails Message #1034

Closed predic8 closed 5 months ago

predic8 commented 5 months ago

Run:

image

on master.

See:

java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "com.predic8.membrane.core.http.Header.getContentType()" is null

at com.predic8.membrane.core.exceptions.ProblemDetails.parse(ProblemDetails.java:155)
at com.predic8.membrane.core.interceptor.oauth2.client.b2c.OAuth2ResourceB2CTest.errorDuringSignIn(OAuth2ResourceB2CTest.java:414)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)