diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-17 10:35:27 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-17 10:35:27 +0100 |
| commit | b05ce93edfeb86ddd7af5a859eb5e20b3653e56b (patch) | |
| tree | 163c8d01e96be782eaa9b066639de34e4e03f981 /internal/server/instituteaccess.go | |
| parent | 354706c76e0531a282d1ee904ec5a0640ab34627 (diff) | |
Refactor: Improve some errors by using errors.New and add context
Diffstat (limited to 'internal/server/instituteaccess.go')
| -rw-r--r-- | internal/server/instituteaccess.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/server/instituteaccess.go b/internal/server/instituteaccess.go index 56ed1cf..050e721 100644 --- a/internal/server/instituteaccess.go +++ b/internal/server/instituteaccess.go @@ -25,14 +25,14 @@ func (ss *Servers) SetInstituteAccess(srv Server) error { } if b.Type != "institute_access" { - return errors.Errorf("not an institute access server") + return errors.Errorf("not an institute access server, url: %s, type: %s", b.URL, b.Type) } if _, ok := ss.InstituteServers.Map[b.URL]; ok { ss.InstituteServers.CurrentURL = b.URL ss.IsType = InstituteAccessServerType } else { - return errors.Errorf("no such institute access server") + return errors.Errorf("institute access server with url: %s, is not yet configured", b.URL) } return nil } |
