You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Team, during integration of this library I've found out a contract mismatch between the Error & Errors classes and the sample error responses from endpoints like oauth2/token.
Example error message from fusionAuth service:
{
"error": "invalid_grant",
"error_description": "The user credentials are invalid.",
"error_reason": "invalid_user_credentials"
}
Error.cs
public class Error {
public string code;
public IDictionary<string, object> data;
public string message;
public Error with(Action<Error> action) {
action(this);
return this;
}
}
The DefaultRestClient always return null values as errors:
if (clientResponse.statusCode >= 300)
clientResponse.errorResponse = JsonConvert.DeserializeObject<Errors>(result.Content.ReadAsStringAsync().Result, DefaultRESTClient.SerializerSettings);
Steps to reproduce:
Use the following method with incorrect credentials and try to read the errors:
synedra
changed the title
Errors from oauth responses are not deserialized properly
SDK: Errors from oauth responses are not deserialized properly in .NET SDK
Dec 10, 2024
v. 1.51.0
Hi Team, during integration of this library I've found out a contract mismatch between the
Error
&Errors
classes and the sample error responses from endpoints likeoauth2/token
.Example error message from fusionAuth service:
Error.cs
The DefaultRestClient always return null values as errors:
Steps to reproduce:
Use the following method with incorrect credentials and try to read the errors:
The text was updated successfully, but these errors were encountered: