Question!
I have a http module which calls for a python script. The data that comes from it is a json file. Then I parse the json. However, sometimes, a certain key has an error, determined by me. I then want it to go to a break module. For example: a date has passed, while this is actually not the case. I’d be ideal if it would become an incomplete execution with 0 retries so I can manually change it.
Then another case: sometimes a key within the JSON is empty because of an inconsistency in the python script. Then I want to be able to filter them to a break module with retries.
Now I have tried adding an error handler with such filters but for some reason when the error occurs it does not go to the break module.
Any help is greatly appreciated!
Just a text based one: if something is empty or something contains something, then it’s an error.
Attached 4 images. So the output comes from the Parse JSON, and I have a break attached with identical conditions as I have for a test that comes from the router that goes to a set variable. For the break it ignores it, but for the set variable it takes it in. I can see that the variables are not fully purple in the break module route, maybe that has something to do with it? But I don’t understand why. Then I ran a scenario where it did have the error and as you can see it goes to the set variable one but not to the break one…
Sure!
Attached 4 images. So the output comes from the Parse JSON, and I have a break attached with identical conditions as I have for a test that comes from the router that goes to a set variable. For the break it ignores it, but for the set variable it takes it in. I can see that the variables are not fully purple in the break module route, maybe that has something to do with it? But I don’t understand why. Then I ran a scenario where it did have the error and as you can see it goes to the set variable one but not to the break one…
This mapping is not produced by json for error handler route. Break will only run if the parse json module will throw an error and the filter will be set for error message or error code or no filter.
In case of variable does not exist, you will have to define an action OR add error handler to the module where you are using the input from parse json and is required but error handler cannot work in this case.
The “problem” is that it does run correctly and always spits out a JSON. The thing is that sometimes a certain JSON key is empty. If that is the case it should break (even though it is a succes according to the module), and should retry until it it not empty
I see. So is there any other way to add a break module? It just needs to retry is a json key is empty, that’s it. It will become a big module it I need to copy all the rest that comes after and paste it via a router until it will work… Or is that the only option?
No it will need to retry calling for the python script in the http module. So in that case I want it to go to a break so that it can retry after 3-5 minutes. In other cases, I will let it go to a break module without retries because I need to manually input the key and fix issues in our python script.