Skip to content

Improve error handling for Freinet requests #2889

@seluianova

Description

@seluianova

Describe the Problem

Currently when a request to Freinet fails, we simply re-throw a general exception in the FreinetApi class:

catch (e: Exception) {
                logger.error("Error updating person in freinet $e")
                throw e
}

This results in a generic "etwas ist schief gelaufen" error in the administration UI:

Image

The problem is that this error occurs when a user creates a card. It's not clear what exactly "schief gelaufen" means, and the user might think there is something wrong with the created card.

Describe Your Preferred Solution

I think we need some general exception for freinet failures, like FreinetTransferFailedException (or a better name), and map it to a clear message in the administration UI smthg like "Failed to transfer data to Freinet".

Describe Possible Alternatives

Related Issues

Related discussion:
https://github.com/digitalfabrik/entitlementcard/pull/2871/changes#r2863770386

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendTask involves making changes to the backendprio:low

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions