locked
What is the activityid in a APIM 500 error? RRS feed

  • Question

  • Hi,

    Sometimes a request that is being made to my APIM environment fails in a APIM 500 error. I know that I have an error in my policies but it is hard to debug if APIM is giving my a 500 error.

    I was wondering if I can use the 500 error APIM is giving me:

    {
    "statusCode": 500,
    "message": "Internal server error",
    "activityId": "31ee4a6b-5ed5-42de-bc9a-8fdd76f975b9"
    }
    The activityid guid paste in here is generated so it is not from a real 500 error.

    What is the activityid? Can I use it to debug my polcies? Is it visible or can I find it in App Insights?

    Monday, September 24, 2018 9:25 AM

Answers

  • Hi all,

    The problem was in the on_error policy. We use a logger for when things go wrong. The policy used a context parameter that was not available.

    Unfortunately it was trail and error to find this. Furthermore, I still wonder what the "activityid" is...

    • Marked as answer by JorneS Monday, November 5, 2018 10:03 AM
    Monday, November 5, 2018 10:03 AM

All replies

  • You may refer to this document for error handling in API Management policies and see if it helps: https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/api-management/api-management-error-handling-policies.md.

    Also, you could try to use fiddler to troubleshoot the issue properly.

    Monday, September 24, 2018 11:19 AM
  • Hi JorneS - The problem you're encountering looks a lot like the issue discussed at this StackOverflow post. Could you review the suggestions made there and see if there's anything that helps resolve the problem and let us know?

    Monday, September 24, 2018 10:11 PM
  • @Jorne

    Did you check the Trace log ,(Frontend,backend..)

    In  the trace  log copy the URL  calling the backend  service and through postman access the url ,Check  the url is working or not.

    One of the most common issue self sing Cert issue, or layer between APIM and Service for example firewall..

    Tuesday, September 25, 2018 1:42 AM
  • Hi all,

    The problem was in the on_error policy. We use a logger for when things go wrong. The policy used a context parameter that was not available.

    Unfortunately it was trail and error to find this. Furthermore, I still wonder what the "activityid" is...

    • Marked as answer by JorneS Monday, November 5, 2018 10:03 AM
    Monday, November 5, 2018 10:03 AM