# Script errors

**URL:** <https://forum.canton.network/t/script-errors/3608>\
**Category:** App Development\
**Created:** [December 20, 2021, 7:13pm UTC](https://forum.canton.network/t/script-errors/3608 "2021-12-20T19:13:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bels3](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bels3/32/2677_2.png) [@Bels3](https://forum.canton.network/u/Bels3)\
**Post date:** [December 20, 2021, 7:13pm UTC](https://forum.canton.network/t/script-errors/3608/1 "2021-12-20T19:13:15Z")

</div>

I keep encountering this error when am writing my test script. Kindly help. Attached is the screenshot.

 ![script error](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/0/000c0e412d3ecfe5396e8873beba5c8e1a533a63.png)  
 ![script error1](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/c/cd98be72a9e31115c02bc95be8a12df30afcd904.png)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [December 20, 2021, 7:21pm UTC](https://forum.canton.network/t/script-errors/3608/2 "2021-12-20T19:21:05Z")

</div>

Hi @Bels3 , can you show us the definition of your `Account` template? It looks like you’ve defined a contract key for that template. For that the maintainers always have to be signatories as well which doesn’t seem toh old in your example.

---

<div class="post-metadata">

**Author:** ![Bels3](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bels3/32/2677_2.png) [@Bels3](https://forum.canton.network/u/Bels3)\
**Post date:** [December 21, 2021, 5:31am UTC](https://forum.canton.network/t/script-errors/3608/3 "2021-12-21T05:31:07Z")

</div>

![acc](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/1/1bae46d0410773fcd17ae3041416c2574abc18c8.png)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [December 21, 2021, 8:58am UTC](https://forum.canton.network/t/script-errors/3608/4 "2021-12-21T08:58:55Z")

</div>

In your template the `customer` is the maintainer while the `serviceProvider` is the signatory. So the only case where the restriction that maintainers are signatories is satisfied is if the two are the same which is not the case in your test script.

You have a few options for fixing this:

1. Add the `customer` to the signatories of the account. I’d argue that this is a good idea even ignoring your issue here. You don’t want the service provider to be able to make unilateral changes or even archive the account wtihout the customer being involved.
2. Alternatively, if you don’t want to change the signatories, your only option is to change the maintainers to be the `serviceProvider` instead of the `customer`. Since the maintainers are derived from the key, that also requires changing your keys to include both the customer and the maintainer, e.g.:

```haskell
key (customer, serviceProvider) : (Party, Party)
maintainer key._2

```
