-
Notifications
You must be signed in to change notification settings - Fork 10
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
Permissions error response not deserialized correctly #918
Comments
Hi @jeremymailen |
Sure, here's more repro detail:
val credential =ClientSecretCredentialBuilder()
.tenantId(params.tenant)
.clientId(params.clientId)
.clientSecret(params.clientSecret)
.build()
val scopes = arrayOf("https://graph.microsoft.com/.default")
val allowedHosts = arrayOf("graph.microsoft.com")
val auth = AzureIdentityAuthenticationProvider(credential, allowedHosts, *scopes)
val client = GraphServiceClient(auth)
val labelResponse = client.security().informationProtection().sensitivityLabels()
.get { request -> request.queryParameters.top = 99 } This throws the exception above. Note that making this call manually with an http client reveals the error response actually looks like this:
|
Thanks for the additional information. As for the service error itself, it's not super useful, I'd encourage reaching out to the support or asking a question on Microsoft Q&A with the Microsoft Graph tag. |
The successful calls work with this msgraph client and serialize / deserialize objects correctly. So the happy path works fine. And also once we add the The bug remains that this client doesn't correctly parse that error that gets returned. Perhaps there's a bug on the MS Graph server side where it should be returning a more specific error, but that's not for me to say :). |
Thanks for the additional information. If you simply call deserialize with the string payload and the ODataErrorFactory as parameters, do you run into the same issue? |
I think the development will be better equipped to troubleshoot from here as I understand code generation from specs is used to produce the implementation. Should be straightforward to reproduce. |
So are you saying you're not going to try to repro just calling the deserialization code on the payload? |
Are you unable to repro the issue? |
Expected behavior
API calls with errors should return a useable error response.
Actual behavior
An exception is thrown while parsing the permission error response:
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: