DOAJ / doaj

The Directory of Open Access Journals - website and directory software
Apache License 2.0
56 stars 16 forks source link

Feature/3830 handle read timeout error not serializable #2379

Closed amdomanska closed 3 months ago

amdomanska commented 5 months ago

Make sure that nonserializable error are handled correctly

Please don't delete any sections when completing this PR template; instead enter N/A for checkboxes or sections which are not applicable, unless otherwise stated below

See #3830

Describe the scope/purpose of the PR here in as much detail as you like

Categorisation

This PR...

Basic PR Checklist

Instructions for developers:

Instructions for reviewers:

Code Style

Documentation

Release Readiness

Testing

List the Functional Tests that must be run to confirm this feature

N/A

Deployment

What deployment considerations are there? (delete any sections you don't need)

Configuration changes

What configuration changes are included in this PR, and do we need to set specific values for production

Scripts

What scripts need to be run from the PR (e.g. if this is a report generating feature), and when (once, regularly, etc).

Migrations

What migrations need to be run to deploy this

Monitoring

What additional monitoring is required of the application as a result of this feature

New Infrastructure

What new infrastructure does this PR require (e.g. new services that need to run on the back-end).

Continuous Integration

What CI changes are required for this

amdomanska commented 5 months ago

I couldn't reproduce this specific error locally.

Currently the raised exception is tested for the specific condition that requires the 3rd attribute of that exception to be serializable. If the condition is not met, the original exception is raised.

In my PR I added the check to see if said attribute is serializable. If it isn't I skip the check and raise the original exception.

I tested the code by raising the appropriate exception manually.

Please let me know if this approach is not correct.