Hi there,
i wanted to try the created custom API via Postman and get this error:
{
"errors": [
{
"title": "Error occurred while handling the request, contact your admin with the provided errorCode and faultingNode ID.",
"detail": "Something went wrong, contact the system administrator.",
"errorCode": 12,
"faultingNode": 101202
}
] }
I tried to look up this error code but no luck.
Token seems to work-> with wrong token i get -> "detail": "Supplied token is invalid or is not allowed for this API.", "errorCode": 1010
I think i sorted out any networking issues by running the POST command on powershell on the DMA itself with the same response:
Invoke-RestMethod : {"errors":[{"title":"Error occurred while handling the request, contact your admin with the
provided errorCode and faultingNode ID.","detail":"Something went wrong, contact the system
administrator.","errorCode":12,"faultingNode":101202}]}
API Route seems to be also OK as i receive :"detail": "Route could not be found.", "errorCode": 5, when i mess around with it.
Any hint what error code 12 means?
BR Kristian
Hi Kristian,
You can find an overview of the error code here.
Error code 12 means "An error occurred while trying to execute an Automation script action."
Did you validate your automation script?
Can you check the information events and the automation logging for any hints?
Hi Kristian,
I believe you are setting a table parameter, without providing the row key.
Can you try using matrix.SetParameterByPrimaryKey(4004, “here your row key”, 1)
Thanks , i checked the communication Logs on manual SET
8207;16.01.2024 12:03:53.683;Received;101202/2227/4004[4] CHANGED -> “1” (Undefined) 01/16/2024 11:59:57
Now with you suggestion and index 4
matrix.SetParameter(4004,”4″, 1);
It works as expected.
Thank you very much.
Great to read it’s all working!
Thanks for letting us know 🙂
Thanks i bookmarked it -> i searched for the error message but there is slightly different text.
Validation is passed.
Logs was a good hint > it said it has problems on paramter set (the action i execute)
—————————–
2715;16.01.2024 10:26:56.917;Received;Alarm: 31120962 (Script Failure (HF Switch): Last of 2 errors: (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Set Parameter (‘_101202_2227’:4004/) Failed: 0x80004005
at CManagedAutomation.RunEntryPointWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, String scriptName, tagVARIANT* pvarEntryPointResult)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn, tagVARIANT* pvarEntryPointResult) (CSharp; 0x80131500h): (see comment for more details)) – 101202/dm-b1-01-stg/Script execution failure at 01/16/2024 10:26:56 [cleared]
————————-
on Set worked on a “standalone” parameter , the errored one is on a parameter within a table > maybe the “Value syntax is wrong”
———–This is the param from the connector——–
muxerUnitMuMuxer
Muxer (Muxer Unit)
read
numeric text
double
next param
true
1.3.6.1.4.1.21035.40.2.8.1.4
integer
true
true
number
—————————–
———–Here the C# code ————
public void Switch(IEngine engine, string target)
{
var matrix = engine.FindElement(“b-ka-dev01”);
matrix.SetParameter(1003, 2); //Set Matrix to “Remote Mode”
if (target.Equals(“PROD”))
{
matrix.SetParameter(4004, 1); // Set the Matrix Input
}
else if (target.Equals(“STAG”))
{
matrix.SetParameter(4004, 2); // Set the Matrix Input
}
———————-
The first Set (enable the matrix to be controlled remotly) is working. But the other not.
BR Kristian