# Reading app state sizes

**URL:** <https://community.dynatrace.com/t/reading-app-state-sizes/38003>\
**Category:** Developer Q&A Forum\
**Tags:** platform-services\
**Created:** [January 16, 2023, 9:09am UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003 "2023-01-16T09:09:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![3ene](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/3ene/32/33646_2.png) [@3ene](https://community.dynatrace.com/u/3ene)\
**Post date:** [January 16, 2023, 9:09am UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003/1 "2023-01-16T09:09:52Z")

</div>

According to [the documentation](https://developer.dynatrace.com/platform-services/services/state/), the maximum storage size for user states is 32KB, and for app states is 50MB. Is there a way to read the current app state usage of my app?

---

<div class="post-metadata">

**Author:** ![gregor\_riegler](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@gregor\_riegler](https://community.dynatrace.com/u/gregor_riegler)\
**Post date:** [January 16, 2023, 3:24pm UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003/2 "2023-01-16T15:24:23Z")

</div>

Hello&nbsp;[@3ene](https://community.dynatrace.com/user/58268)&nbsp;,

No, there is currently no way to read the current app state usage of the app.

---

<div class="post-metadata">

**Author:** ![david\_petroni](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_petroni/32/1420_2.png) [@david\_petroni](https://community.dynatrace.com/u/david_petroni)\
**Post date:** [April 21, 2023, 8:02am UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003/3 "2023-04-21T08:02:32Z")

</div>

Thansk!

I would like to jump in to ask a follow up question: when reading the SDK’s signature, I see

```javascript
stateClient.setAppState(config): Promise<void>

```

Does it mean that the SDK will throw an error in this case?

If so, I would love to have a typed error for this specific case.

Thanks!

---

<div class="post-metadata">

**Author:** ![educampver](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/educampver/32/29917_2.png) [@educampver](https://community.dynatrace.com/u/educampver)\
**Post date:** [April 21, 2023, 12:58pm UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003/4 "2023-04-21T12:58:37Z")

</div>

Hi David, short answer, yes, it may throw an error. Unfortunately, there’s no way to specify what type of errors a function might throw in TypeScript. However, Dynatrace SDKs provide utils functions for error handling. You can see how to use them in [this post](https://community.dynatrace.com/post/208280)&nbsp;about handling errors in the query client. It’s not the same SDK, but it’s the same principle.

---

<div class="post-metadata">

**Author:** ![david\_petroni](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_petroni/32/1420_2.png) [@david\_petroni](https://community.dynatrace.com/u/david_petroni)\
**Post date:** [April 24, 2023, 2:12pm UTC](https://community.dynatrace.com/t/reading-app-state-sizes/38003/5 "2023-04-24T14:12:18Z")

</div>

Great! Where do I find out what “names” are there to be matched? Thansk!
