# Addition of some error status codes

**URL:** <https://discuss.blues.com/t/addition-of-some-error-status-codes/3569>\
**Category:** Notecard API\
**Created:** [June 15, 2026, 2:55pm UTC](https://discuss.blues.com/t/addition-of-some-error-status-codes/3569 "2026-06-15T14:55:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/jakov/32/1714_2.png) [@Jakov](https://discuss.blues.com/u/Jakov)\
**Post date:** [June 15, 2026, 2:55pm UTC](https://discuss.blues.com/t/addition-of-some-error-status-codes/3569/1 "2026-06-15T14:55:38Z")

</div>

Hi Blues,

First of all, I saw that you added per API status/error codes, that helps a lot!  
Now, while I was exploring my Notecard handling, I noticed that for some messages, there are errors/statuses that do not have their reserved codes.  
E.g. when adding templates, there could be a port alias with an already registered template on some other Notefile

```python
create_template_req = {
    "req": "note.template",
    "file": "template_test.qos",
    "format": "compact",
    "port": 12,
    "body": {
        "timestamp": "24",
        "id": "12",
        "alarm": {
            "cleared": True,
            "mode": "24",
            "type": "24",
            "rawValue": 14.1,
            "value": 14.1,
            "closed": True
        }
    }
}
create_template_rsp = nCard.Transaction(create_template_req)
print(json.dumps(create_template_rsp, indent=4))

create_template_req["file"] = "template_test_2.qos"
create_template_rsp = nCard.Transaction(create_template_req)
print(json.dumps(create_template_rsp, indent=4))

```

Got this:

```python
{
    "err": "port is already being used by template_test.qos.",
    "crc": "0005:8279A918"
}

```

Would be nice to have to mapped to something like `{port-in-use}` or `{template-port-in-use}`

```python
{
    "err": "port is already being used by template_test.qos {port-in-use}.",
    "crc": "0005:8279A918"
}

```

I understand this is a low prio issue and one that is playing catch-up for a subset of Notecard API that is presumably not yet stabilized.

---

<div class="post-metadata">

**Author:** ![tjvantoll](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/tjvantoll/32/231_2.png) [@tjvantoll](https://discuss.blues.com/u/tjvantoll)\
**Post date:** [June 15, 2026, 7:51pm UTC](https://discuss.blues.com/t/addition-of-some-error-status-codes/3569/2 "2026-06-15T19:51:17Z")

</div>

Hey @Jakov,

Glad the documented codes are useful!

And something like `{port-in-use}` is a reasonable request for that error; I’ll pass it along to our firmware team.

Thanks,

TJ
