diff options
| -rw-r--r-- | internal/discovery/discovery.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go index 415c71a..3ab13b3 100644 --- a/internal/discovery/discovery.go +++ b/internal/discovery/discovery.go @@ -67,6 +67,7 @@ func getDiscoFile(jsonFile string, previousVersion uint64, structure interface{} // - [IMPLEMENTED] on "first launch" when offering the search for "Institute Access" and "Organizations"; // - [TODO] when the user tries to add new server AND the user did NOT yet choose an organization before; // - [TODO] when the authorization for the server associated with an already chosen organization is triggered, e.g. after expiry or revocation. +// - [IMPLEMENTED using a custom error message] NOTE: when the org_id that the user chose previously is no longer available in organization_list.json the application should ask the user to choose their organization (again). This can occur for example when the organization replaced their identity provider, uses a different domain after rebranding or simply ceased to exist. func (discovery *Discovery) DetermineOrganizationsUpdate() bool { return discovery.Organizations.Timestamp.IsZero() } @@ -205,7 +206,7 @@ type GetOrgByIDNotFoundError struct { } func (e GetOrgByIDNotFoundError) Error() string { - return fmt.Sprintf("No Secure Internet Home found in organizations with ID %s", e.ID) + return fmt.Sprintf("No Secure Internet Home found in organizations with ID %s. Please choose your server again", e.ID) } type GetServerByURLNotFoundError struct { @@ -215,7 +216,7 @@ type GetServerByURLNotFoundError struct { func (e GetServerByURLNotFoundError) Error() string { return fmt.Sprintf( - "No institute access server found in organizations with URL %s and type %s", + "No institute access server found in organizations with URL %s and type %s. Please choose your server again", e.URL, e.Type, ) @@ -239,5 +240,5 @@ type GetSecureHomeArgsNotFoundError struct { } func (e GetSecureHomeArgsNotFoundError) Error() string { - return fmt.Sprintf("No Secure Internet Home found with URL: %s", e.URL) + return fmt.Sprintf("No Secure Internet Home found with URL: %s. Please choose your server again", e.URL) } |
