Long running operation has failed

rakesh bharati 0 Reputation points
2025-01-24T12:44:56.88+00:00

How to get rid of The long running operation has failed error while hitting the apis

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,271 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer Ali 2,530 Reputation points Microsoft Vendor
    2025-01-28T15:38:53.9433333+00:00

    @rakesh bharati ,

    To address the "long running operation has failed" error when hitting APIs, you can follow these steps:

    1. Check the Operation Status: Use the API to check the status of the long-running operation. If it has failed, the response will typically include an error property that provides details about the failure.
    2. Handle Errors Gracefully: When you receive a failure response, ensure your application can handle this gracefully. This may involve logging the error and notifying users or administrators.
    3. Retry Logic: Implement a retry mechanism for transient errors. However, be cautious with excessively long operations, as they may exhaust your resources.
    4. Abort Long-Running Operations: If an operation is stuck or failing, you can abort it using the appropriate API commands. This allows you to regain control and potentially start a new operation.
    5. Review API Documentation: Consult the API documentation for specific error codes and messages to understand the cause of the failure better.

    By following these steps, you can manage and mitigate the issues related to long-running operations effectively.Hope this helps. Do let us know if you have any further queries.


    References:

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.