dash-licenses icon indicating copy to clipboard operation
dash-licenses copied to clipboard

Make ClearlyDefined API call error handling more resilient

Open waynebeaton opened this issue 3 years ago • 1 comments

When a ClearlyDefined API query fails, we need to respond more gracefully. Right now, the tool logs an error and moves on. This could potentially result in the tool erroneously creating review requests for content that might otherwise have been approved via ClearlyDefined. As a small improvement, we need to at least throw an exception so that we don't end up erroneously creating review requests.

Unfortunately, ClearlyDefined API calls do fail often enough that this could be a real problem.

Today, I had a failure in which one of the entries out of 1K was well-formed but resulted in ClearlyDefined answering an error message (it returns 200, but the response is plain text so it is the JSON parsing that fails). Because of this error, all 1K entries were, effectively, rejected.

waynebeaton avatar Feb 11 '22 04:02 waynebeaton

The scenario where ClearlyDefined fails on a single entry, but rejects the whole batch has been resolved.

There may still be work to do on general failures.

waynebeaton avatar Mar 29 '23 13:03 waynebeaton