Closed michaeldabbott closed 4 years ago
What is the status code on this response?
The response object is nil, when this occurs so it's not set. So fusion.LoginResponse is nil, fusionauth.errors is &{map[] []} and the err object is EOF.
So I'm thinking possibly that you return a pointer to the fusionauth.LoginResponse to which the statusCode could be a 403.
Can you make this same request using a REST client such as Postman, Insomnia or cURL and post the response code and response body here? This will tell us is there is something wrong with the API or the go client.
It's my bad. It was the way I was un-marshalling data resulting in the response object being nil.
The statusCode was actually 404 in the above scenario. Apologies.
No problem, glad you got it worked out!
Hi Y'all
So encountered an issue where if you have
Default tenant Specific tenant
a user created on the default tenant
and you make a request to a specific tenant and not the default aka pass in the wrong tenant id
fusionauth.Errors will return a &map[] []{} and err with be an EOF will no helpful error regarding the issue. A more appropriate response could be to return a 403 as part of the fusionauth.LoginResponse which contains a statusCode.
Much appreciated.