Bug/sc 133490 stable output schema#37
Conversation
|
This pull request has been linked to Shortcut Story #133490: [api-connect] get a stable output schema. |
Alexlandeau
left a comment
There was a problem hiding this comment.
Small nitpick on behaviour on error default value for legacy recipes, and broken for python3.7 but already discussed
| logger.info("config={}".format(logger.filter_secrets(config))) | ||
|
|
||
| credential_parameters = config.get("credential", {}) | ||
| behaviour_when_error = config.get("behaviour_when_error", "add-error-column") |
There was a problem hiding this comment.
🥜 nitpick: as discussed, maybe we can have a default to add-error-column for previously-existing recipes, and keep-error-column else
| self.timeout = endpoint.get("timeout", -1) | ||
| if self.timeout > 0: | ||
| self.requests_kwargs.update({"timeout": self.timeout}) | ||
| self.behaviour_when_error = behaviour_when_error or "add-error-column" |
There was a problem hiding this comment.
Same feedback regarding default value
| self.maximum_number_rows = maximum_number_rows | ||
| self.is_row_limit = (self.maximum_number_rows > 0) | ||
| self.can_raise = False | ||
| self.behaviour_when_error = behaviour_when_error or "add-error-column" |
There was a problem hiding this comment.
Same feedback regarding default value
| "label": "Error behaviour", | ||
| "description": "Decide how the recipe should react when an input line results in an error", | ||
| "type": "SELECT", | ||
| "defaultValue": "keep-error-column", |
There was a problem hiding this comment.
🥜 nitpick: why have keep-error-column as default when add-error-column is set everywhere else ?
There was a problem hiding this comment.
This is the way to enforced the new preferred behavior on new flows while keeping the same behavior on preexisting flows.
This selector did not exist in the previous version, so is not saved in existing flows that are already using the plugin. As a result, the behavior of existing flows will not be changed, because in absence of the behaviour_when_error parameter, add-error-column(the previous behavior) is the default defined in the code. When a new recipe is created, the new behavior is the one set by default in the UI, the preferred and more stable "keep-error-column"
No description provided.