Generic Exception For Using SDK in Azure Pipeline
See original GitHub issueHi,
Exceptions in rest api requests are easy. We can use the response.status_code for creating the desired logic. But in SDK, there isn’t any clear results. Consider this code that I used in Pipeline task:
result = network_client.network_interfaces.begin_create_or_update(
rg_name,
nic_name,
parameters=params).result()
When I use the exception like except AzureHttpError as error
the output is Code: ResourceNotFound
. That I’m not sure how can be used for custom condition in task because is not generic.
Is there any right way to handling error for custom condition?
Best Jasmine
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
azure-iot-sdk-python/pipeline_exceptions.py at main - GitHub
A Python SDK for connecting devices to Microsoft Azure IoT services ... """This module defines exceptions that may be raised from a pipeline"""....
Read more >Handle errors and exceptions in Azure Logic Apps
How to handle errors and exceptions that happen in automated tasks and workflows created by using Azure Logic Apps.
Read more >REST API -Exception - The pipeline is not valid. The pipeline ...
Hi Team,. We are trying automate the build-release pipeline import-export process using azure DevOps Web API and asp.net. Now I am facing below...
Read more >General Guidelines: Implementation | Azure SDKs
Hierarchies of clients inherit parent client configuration unless explicitly changed or overridden. Exceptions to this requirement are as follows: Log level, ...
Read more >Source code for azure.core.pipeline._base - NET
_policy.on_exception, request) raise else: _await_result(self. ... [docs]class Pipeline(AbstractContextManager, Generic[HTTPRequestType, HTTPResponseType]): ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kristapratico Krista! You are an angel!
AzureHttpError
didn’t response the status_code butHttpResponseError
working like charm! Thank you!@anotherancientalien thanks. Just so I understand your question, are you looking for the HTTP status code on the SDK error? The status code is exposed on the exception, like the below:
Let me know if I misinterpreted, though!