# Get error when try to add contract to other contract call

**URL:** https://forum.fuel.network/t/get-error-when-try-to-add-contract-to-other-contract-call/3034
**Category:** TypeScript SDK
**Created:** [September 1, 2023, 7:07pm UTC](https://forum.fuel.network/t/get-error-when-try-to-add-contract-to-other-contract-call/3034 "2023-09-01T19:07:00Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![sway](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sway/32/103_2.png) [@sway](https://forum.fuel.network/u/sway)
#### Post date: [September 4, 2023, 12:55pm UTC](https://forum.fuel.network/t/get-error-when-try-to-add-contract-to-other-contract-call/3034/5 "2023-09-04T12:55:36Z")

</div>

> [@Dhaiwat10](#):
>
> storageSlots

Thanks for the suggestion but in my contract I have everywhere catches that would prevent failing if the variable is not initialized, like below.

```auto
let balance = storage.user_collateral.get((account, asset_config.asset_id)).try_read().unwrap_or(0);

```

Also would like to notify you that the Rust tests are passing successfully for this contract, we just have some problems with typescript SDK due to updates

But it’s really interesting to hear about how to initialize storage slots, probably it will make my contract cleaner, please have a look at new topic here

> [@How to pass storageSlots to make default values instead of undefined](https://forum.fuel.network/t/how-to-pass-storageslots-to-make-default-values-instead-of-undefined/3045):
>
> Here is storage of my Market contract that has following data. How to pass storageSlots them so it would work, because I tried to do ::default() but value is still undefined , so I have to use try\_read().unwrap\_or(0) in every line where I want to read value.

---

_[View the full topic](https://forum.fuel.network/t/get-error-when-try-to-add-contract-to-other-contract-call/3034)._
