System.tag.addTag fails silently

Hi Forum,

System.tag.addTag fails silently:

Code example: (pretty bad returns, anyway.., this always gives OK") even if it's not supposed to give OK:

	value = request["postData"]
	try:
	    system.tag.addTag(**value)
	    return {"json": "OK"}
	except Exception as e:
	   	return {"json": "ERROR"}

example tested:

{
    "parentPath": "",
    "name": "TagMemory",
    "tagType": "MEMORY",
    "dataType": "Int2",
    "value": 26
}

-> Created successfully

{
    "parentPath": "",
    "name": "TagMemory",
    "tagType": "MEMORY",
    "dataType": "Int2",
    "value": 28
}

-> No change on the tag, and also returns Ok

I think you'd probably see something logged in the gateway logs. Not ideal, but it is what it is.

Try system.tag.configure instead? system.tag.addTag and friends are deprecated.

You are right, I'm seeing errors in the gateway logs. I will test the .configure.

Hey @Kevin.Herron , apparently system.tag.configure fails silently too, suppose that I want to do
system.tag.configure(...,'a') for abort, how can I check if aborted or no? I really need that feedback

Are you checking the List of QualityCode returned by system.tag.configure?

1 Like

I checked it now and it's working perfectly, Thank you :slight_smile:

1 Like