From d6f5dafb46efbecde2c47501afe47484d3cbf695 Mon Sep 17 00:00:00 2001 From: vpf26432 Date: Mon, 20 Mar 2023 17:14:04 +0000 Subject: [PATCH] replacing accidental deletion of error message --- pyscicat/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyscicat/client.py b/pyscicat/client.py index e5b839c..dabe89d 100644 --- a/pyscicat/client.py +++ b/pyscicat/client.py @@ -1,10 +1,10 @@ from datetime import datetime import enum - import base64 import hashlib import logging import json +import re from typing import Optional from urllib.parse import urljoin, quote_plus @@ -129,6 +129,8 @@ def _call_endpoint( if ( allow_404 and response.status_code == 404 + and re.match(r"Unknown (.+ )?id", err.get("message", "")) + ): # The operation failed but because the object does not exist in SciCat. logger.error("Error in operation %s: %s", operation, err)