# @prismicio/client - error responses

**URL:** <https://community.prismic.io/t/prismicio-client-error-responses/7781>\
**Category:** Developing with Prismic\
**Tags:** javascript\
**Created:** [November 8, 2021, 10:51am UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781 "2021-11-08T10:51:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter2](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@peter2](https://community.prismic.io/u/peter2)\
**Post date:** [November 8, 2021, 10:51am UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/1 "2021-11-08T10:51:26Z")

</div>

Does anyone have a good overview on what errors the Prismic.client from @prismicio/client can return in different scenarios such as network outage, server side issues, document issues? I would like to write an error handler to cover those for the different scenarios.

thanks,  
goppi

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [November 9, 2021, 2:44pm UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/3 "2021-11-09T14:44:38Z")

</div>

Hello @peter2

Thanks for reaching out to us.

I have asked my dedicated team about different error responses from the Prismic client kit. I'll come back to you as I hear back from them.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [November 10, 2021, 10:23am UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/4 "2021-11-10T10:23:47Z")

</div>

Hello @peter2

With @prismicio/client@5 (or 4), errors throw are generic errors, and the message can help you to write error handlers.  
With @prismicio/client@6 (beta), here are the error classes have thrown by the package: [prismic-client/index.ts at v6 · prismicio/prismic-client · GitHub](https://github.com/prismicio/prismic-client/blob/v6/src/index.ts#L10-L12), you can use them to identify more precisely what happened.

I hope this answers your question.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [November 12, 2021, 9:37am UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/5 "2021-11-12T09:37:48Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 3:18pm UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/6 "2021-12-09T15:18:31Z")

</div>



---

<div class="post-metadata">

**Author:** ![peter2](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@peter2](https://community.prismic.io/u/peter2)\
**Post date:** [April 6, 2022, 12:18pm UTC](https://community.prismic.io/t/prismicio-client-error-responses/7781/7 "2022-04-06T12:18:12Z")

</div>

The link that was provided in the solution for v6 is broken: the correct link is [prismic-client/index.ts at v6 · prismicio/prismic-client · GitHub](https://github.com/prismicio/prismic-client/blob/ba9e8ca2b8508356bff7c396455ad2b760694fbe/src/index.ts#L31-L34)

The link points to various Error classes that are returned in the response. I havn't made use of them, but am looking solely at the status parameter of the response.
