# Capture custom response code related to an application

**URL:** <https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403>\
**Category:** Open Q&A\
**Tags:** request-attributes\
**Created:** [February 12, 2023, 9:38am UTC](https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403 "2023-02-12T09:38:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramanan\_16](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ramanan\_16](https://community.dynatrace.com/u/Ramanan_16)\
**Post date:** [February 12, 2023, 9:38am UTC](https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403/1 "2023-02-12T09:38:57Z")

</div>

Hi All,

How to capture custom response code related to an application? We have 1000+ response codes like this. Any idea how to capture them?

ResponseCode&nbsp; &nbsp;Description  
10001&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successful  
10002&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; biller requires exact payment amount  
10003&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; biller does not accept overpayment  
10004&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; biller does not accept underpayment.  
10006&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system cannot process this transaction at this time.  
10007&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requires a branch code.  
10008&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; requires a district code.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [February 12, 2023, 10:28am UTC](https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403/2 "2023-02-12T10:28:23Z")

</div>

Hello&nbsp;[@Ramanan\_16](https://community.dynatrace.com/user/14734)

If these codes are written in the exceptions then you can use the custom events matrics to capture them.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![Ramanan\_16](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ramanan\_16](https://community.dynatrace.com/u/Ramanan_16)\
**Post date:** [February 12, 2023, 10:31am UTC](https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403/3 "2023-02-12T10:31:09Z")

</div>

Hi Babar,

Thanks for the response. Let me check this.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [February 16, 2023, 1:26am UTC](https://community.dynatrace.com/t/capture-custom-response-code-related-to-an-application/38403/4 "2023-02-16T01:26:56Z")

</div>

You can capture them for example from a Method argument/return value or HTTP Header using&nbsp;[Request attributes.](https://www.dynatrace.com/support/help/platform-modules/applications-and-microservices/services/request-attributes)
