Skip to content

Commit bada5fa

Browse files
committed
Fix failing recipe fails in 'Add an error column' mode [sc-163656]
1 parent cde8a66 commit bada5fa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python-lib/rest_api_recipe_session.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ def retrieve_next_page(self, is_raw_output):
7878
logger.info("retrieve_next_page: Calling next page")
7979
json_response = self.client.paginated_api_call(can_raise_exeption=self.can_raise)
8080
default_dict = {
81-
DKUConstants.REPONSE_ERROR_KEY: json_response.get(DKUConstants.REPONSE_ERROR_KEY, None)
81+
DKUConstants.REPONSE_ERROR_KEY: ""
8282
} if self.behaviour_when_error == "keep-error-column" else {}
83+
if isinstance(json_response, dict) and DKUConstants.REPONSE_ERROR_KEY in default_dict:
84+
default_dict[DKUConstants.REPONSE_ERROR_KEY] = json_response.get(DKUConstants.REPONSE_ERROR_KEY, None)
8385
metadata = self.client.get_metadata() if self.display_metadata else default_dict
8486
is_api_returning_dict = True
8587
if self.extraction_key:

0 commit comments

Comments
 (0)