# How to exclude 403 from fourxx errors in Metric selector

**URL:** <https://community.dynatrace.com/t/how-to-exclude-403-from-fourxx-errors-in-metric-selector/53639>\
**Category:** Dashboarding\
**Tags:** dynatrace-managed\
**Created:** [October 8, 2025, 1:19am UTC](https://community.dynatrace.com/t/how-to-exclude-403-from-fourxx-errors-in-metric-selector/53639 "2025-10-08T01:19:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![padarthimanoj](https://avatars.discourse-cdn.com/v4/letter/p/71e660/32.png) [@padarthimanoj](https://community.dynatrace.com/u/padarthimanoj)\
**Post date:** [October 8, 2025, 1:19am UTC](https://community.dynatrace.com/t/how-to-exclude-403-from-fourxx-errors-in-metric-selector/53639/1 "2025-10-08T01:19:44Z")

</div>

i want to exclude 403 from this metric selector of query&nbsp;queryDefinition for API yaml

builtin:service.keyRequest.errors.fourxx.count:filter(and(or(in(“dt.entity.service\_method”,entitySelector(“type(service\_method),entityName.equals(~”\<my-api-url\>~“)”))))):splitBy():sort(value(auto,descending)):limit(20)

i have tried this

builtin:service.keyRequest.errors.fourxx.count:filter(and(ne(“http.status”,403),or(in(“dt.entity.service\_method”,entitySelector(“type(service\_method),entityName.equals(~”\<my-api-url\>~“)”))))):splitBy():sort(value(auto,descending)):limit(20)

but i am getting error that http.status is not a valid dimension. we are using dyntrace classic

is it possible through queryDefinition or any other setting configuration is required?

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [October 8, 2025, 6:12am UTC](https://community.dynatrace.com/t/how-to-exclude-403-from-fourxx-errors-in-metric-selector/53639/2 "2025-10-08T06:12:12Z")

</div>

It simple - you cannot. This classic metric sums all 4xx codes already.  
If you need any other behaviour, there are multiple ways. Probably I’d go with defining a calculated service metric for this purpose.

If you are on SaaS, the Grail metric has the dimension:

```markup
timeseries sum(dt.service.request.failure_count), by: { http.response.status_code }

```
