Can't get pipeline approvals when using DeploymentsRequestBuilder
Hi I am getting error during trying to get approvals.
Caused by: org.azd.exceptions.AzDException: ApiResponseParsingException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 1]
at org.azd.abstractions.serializer.JsonSerializer.deserialize(JsonSerializer.java:78) ~[azd-6.0.2.jar:na]
at org.azd.abstractions.internals.ClientRequestAdapter.execute(ClientRequestAdapter.java:136) ~[azd-6.0.2.jar:na]
at org.azd.release.deployments.DeploymentsRequestBuilder.list(DeploymentsRequestBuilder.java:65) ~[azd-6.0.2.jar:na]
Hi @tomaszburzynski88, Can you please share the raw response from Api? In the catch block call ResponseHandler.getResponse() this returns the raw response.
Hi @hkarthik7,
I have the kind of issues by using version 6.0.2 with a different API call:
client.git().repositories().git(repository)
The raw response is an HTML with:
title (redacted) = The controller for path '/redacted/_apis/git/repositories/redacted' was not found or does not implement IController
and
part of the body:
<div class="title">404 - Page not found</div>
<div class="details">Looks like this page doesn't exist or can't be found. Make sure the URL is correct.</div>
The called URL is (redacted):
https://dev.azure.com/redacted/redacted/_apis/git/repositories/redacted?api-version=7.1-preview.2
By using a curl, I have the same result.
But it works by changing the api-version to:
- 7.1 as described in Repositories - Get Repository
- 7.2-preview.1 as described in Repositories - Get Repository
After more tests for repositories and repository:
No issues with AzDClientApi.
The errors occur with AzDServiceClient.
@c4rth, Thanks for raising this, I've opened a new issue #85 which will be fixed in next version.
@tomaszburzynski88, The fix is applied in v6.0.3.