# Usererror message not shown on the tryton interface

**URL:** https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198
**Category:** Developer
**Created:** [January 15, 2025, 4:14pm UTC](https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198 "2025-01-15T16:14:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mimo\_Alva](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a698b9/32.png) [@mimo\_Alva](https://discuss.tryton.org/u/mimo_Alva)
#### Post date: [January 15, 2025, 4:14pm UTC](https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198/1 "2025-01-15T16:14:59Z")

</div>

Hi,

I need some help i have a condition related to a specifc field where i want to show me a usererror text if a field is not exist

here is my code \>

```auto
                if not supplier_party:
                    print(f"Supplier '{supplier_name}' not found.")
                    raise UserError(gettext(
                    'operation_doc.msg_missing_supplier_party'))

```

These lines of codes is part of a function related to a button to press  
—\>i can see the print result in the terminal but the raise UserError(gettext.. doesnt work because nothing appear on the tryton interface .

any help will be appreciated

Thanks

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 15, 2025, 5:48pm UTC](https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198/2 "2025-01-15T17:48:48Z")

</div>

What is the result of the JSON-RPC call to the button?  
Is it the error?

---

<div class="post-metadata">

### Author: ![mimo\_Alva](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/m/a698b9/32.png) [@mimo\_Alva](https://discuss.tryton.org/u/mimo_Alva)
#### Post date: [January 15, 2025, 6:42pm UTC](https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198/3 "2025-01-15T18:42:07Z")

</div>

Hi Mr.ced Yes, when the JSON-RPC call is made to the button, I see the following result in the terminal logs:

```auto
Supplier 'developer2' not found.  
Error processing record : The supplier party is missing for the record "%(record)s".  

```

It does not appear on the Tryton interface. Instead, it is logged in the terminal where the server is running.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 15, 2025, 8:10pm UTC](https://discuss.tryton.org/t/usererror-message-not-shown-on-the-tryton-interface/8198/4 "2025-01-15T20:10:39Z")

</div>

> [@mimo\_Alva](#):
>
> when the JSON-RPC call is made to the button, I see the following result in the terminal logs

I do not understand because this does not look like JSON.
