Addition of some error status codes

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

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:

{
    "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}

{
    "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.

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