# Error handling of different status codes

**URL:** <https://community.weweb.io/t/error-handling-of-different-status-codes/1807>\
**Category:** Ask us anything\
**Tags:** workflows\
**Created:** [February 4, 2023, 7:52am UTC](https://community.weweb.io/t/error-handling-of-different-status-codes/1807 "2023-02-04T07:52:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thisismetrying](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thisismetrying/32/2069_2.png) [@thisismetrying](https://community.weweb.io/u/thisismetrying)\
**Post date:** [February 4, 2023, 7:52am UTC](https://community.weweb.io/t/error-handling-of-different-status-codes/1807/1 "2023-02-04T07:52:53Z")

</div>

How to handle errors based on error type?

When we have errors due to API calls, the workflow stops and go into the error workflow. HOWEVER, I want different error messages for 404 and 503. How can I do that if I can’t determine the status codes? there’s no result when I go to collections of the failed rest API. I can’t also do rest API call directly to error workflow because it will stop the error workflow.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [February 4, 2023, 12:03pm UTC](https://community.weweb.io/t/error-handling-of-different-status-codes/1807/2 "2023-02-04T12:03:41Z")

</div>

The “on error” side of the workflow will have the `cirrent error` with all the details of the error.  
See [here](https://community.weweb.io/t/when-using-rest-api-how-can-i-use-data-from-a-handled-error-within-on-error-workflow/1161/2).
