# Destinguish between internal error code and service error code

**URL:** <https://community.traefik.io/t/destinguish-between-internal-error-code-and-service-error-code/4900>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [March 12, 2020, 8:50pm UTC](https://community.traefik.io/t/destinguish-between-internal-error-code-and-service-error-code/4900 "2020-03-12T20:50:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neclimdul](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/neclimdul/32/1724_2.png) [@neclimdul](https://community.traefik.io/u/neclimdul)\
**Post date:** [March 12, 2020, 8:50pm UTC](https://community.traefik.io/t/destinguish-between-internal-error-code-and-service-error-code/4900/1 "2020-03-12T20:50:48Z")

</div>

Is there a way to distinguish between an internal 503 error from traefik being unable to talk to a service and a 503 status code returned from a service? Drupal uses a 503 code to say "I'm in maintenance mode" which conflicts with the 503 triggered internally by traefik if a service isn't available. Both seem to get routed through the error page middleware with the same code making it difficult to provide useful content on the error page. Best I can tell skimming through traefik's code 503 is a special case in this regard and I don't see a way to do this.

---

<div class="post-metadata">

**Author:** ![aleksvujic](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/aleksvujic/32/4885_2.png) [@aleksvujic](https://community.traefik.io/u/aleksvujic)\
**Post date:** [February 7, 2022, 1:51pm UTC](https://community.traefik.io/t/destinguish-between-internal-error-code-and-service-error-code/4900/3 "2022-02-07T13:51:42Z")

</div>

Have you found a way to solve this issue?
