Added request timeout of 15s to __get_json_response()
Added response.raise_for_status() in the main try block to ensure an actual HTTPError can be caught when one occurs. Previously, the only error you'd see logged would be related to response.json() bombing, due to 400/500 errors not returning JSON-like content.
Updated __get_json_response() to re-try fetching data if an initial fetch failed. Kuali's front-facing endpoints notoriously return intermittent 502s; this update should give us the best chance at avoiding data loss due to these random errors.
__get_json_response() will now always return something, even if it's None.
Removal of display-related content from descriptions:
Added the DISPLAYContentCategory for Oscar to ignore. This category is intended to catch blurbs that reference the position or display of other content on Kuali's front-facing catalog views (e.g. "Please scroll to X section for more info..."), which may be incorrect when shown outside of the context of Kuali.
JSON fetch hardening (
__get_json_response()
):__get_json_response()
response.raise_for_status()
in the maintry
block to ensure an actualHTTPError
can be caught when one occurs. Previously, the only error you'd see logged would be related toresponse.json()
bombing, due to 400/500 errors not returning JSON-like content.__get_json_response()
to re-try fetching data if an initial fetch failed. Kuali's front-facing endpoints notoriously return intermittent 502s; this update should give us the best chance at avoiding data loss due to these random errors.__get_json_response()
will now always return something, even if it'sNone
.Removal of display-related content from descriptions:
DISPLAY
ContentCategory
for Oscar to ignore. This category is intended to catch blurbs that reference the position or display of other content on Kuali's front-facing catalog views (e.g. "Please scroll to X section for more info..."), which may be incorrect when shown outside of the context of Kuali.