tataille / node-red-french-holidays

A node-red component for French Holiday
Apache License 2.0
7 stars 3 forks source link

Message error NOd Red "Error: School Holiday API is returning no records" #5

Closed Apollon16 closed 1 year ago

Apollon16 commented 1 year ago

hello, For a few days I have this error from Node red "Error: School Holiday API is returning no records". What should we do in this case? THANKS

Capture d’écran 2023-04-03 175545

Capture d’écran 2023-04-03 205328

tataille commented 1 year ago

Hi, this error is just a warning message (I could change the type of message). Sometime the official API is returning null value, and in the previous version it causes the nodered server to stop running.

Solution is in this case to ask again for value (poll)

tataille commented 1 year ago

Due to the fact the plugin interact with external APIs provided by French government, external errors (missing records, connection errors..) are thrown to the node-red core. To handle the exceptions and program a new query, a catch block must be added to the node-red flow. Error details can be found in the exception message payload.

tataille commented 1 year ago

The README.md describe the error handling: "Due to the fact the plugin interact with external APIs provided by French government, external errors (missing records, connection errors..) are thrown to the node-red core. To handle the exceptions and program a new query, a catch block must be added to the node-red flow. Error details can be found in the exception message payload."