# Function trigger-function failed with error-code: 541 Unknown

**URL:** <https://community.dynatrace.com/t/function-trigger-function-failed-with-error-code-541-unknown/37700>\
**Category:** Developer Q&A Forum\
**Tags:** data-privacy-and-product-security, app-functions\
**Created:** [December 14, 2022, 5:37pm UTC](https://community.dynatrace.com/t/function-trigger-function-failed-with-error-code-541-unknown/37700 "2022-12-14T17:37:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [December 14, 2022, 5:37pm UTC](https://community.dynatrace.com/t/function-trigger-function-failed-with-error-code-541-unknown/37700/1 "2022-12-14T17:37:04Z")

</div>

What is HTTP Error code 541 mean when trying to call an app function? The app function calls an external service. How to troubleshoot this?

 ![Screenshot 2022-12-13 at 13.41.32.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/e/fee5e8a4fe4d8548000ff33dfb778b7e6697d2d5.png)

---

<div class="post-metadata">

**Author:** ![dirk\_wall](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dirk_wall/32/4849_2.png) [@dirk\_wall](https://community.dynatrace.com/u/dirk_wall)\
**Post date:** [December 14, 2022, 6:55pm UTC](https://community.dynatrace.com/t/function-trigger-function-failed-with-error-code-541-unknown/37700/2 "2022-12-14T18:55:12Z")

</div>

Hey Radek,

Could you please check if the external endpoint you try to connect to is in the Dynatrace JavaScript Runtime allow-list?

[Allow outbound connections | Dynatrace Developer](https://developer.dynatrace.com/develop/functions/allow-outbound-connections/)

Nevertheless, I agree that we need to improve the error message here but this is already on the way AFAIK.

Cheers,  
Dirk

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [December 14, 2022, 7:01pm UTC](https://community.dynatrace.com/t/function-trigger-function-failed-with-error-code-541-unknown/37700/3 "2022-12-14T19:01:43Z")

</div>

OK. Good hint! Indeed we’re using a custom endpoint via the AWS API gateway. For the sake we’ve disabled the limitation to outbound connections to endpoints in the allow-list like that:

 ![Radoslaw_Szulgo_0-1671044461256.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/3/93774f8d397c1ec217b472ea3c318dab91fcb1ff.png)

This helped. We’ll turn it on and add our endpoint to the list. Thanks Dirk!
