diff --git a/backend/pkg/web/handler/source.go b/backend/pkg/web/handler/source.go index 1a7212acc..d3d4deffb 100644 --- a/backend/pkg/web/handler/source.go +++ b/backend/pkg/web/handler/source.go @@ -38,6 +38,13 @@ func CreateReconnectSource(c *gin.Context) { EndpointId: sourceCred.EndpointID.String(), }) + if err != nil { + err = fmt.Errorf("an error occurred while retrieving source definition: %w", err) + logger.Errorln(err) + c.JSON(http.StatusBadRequest, gin.H{"success": false, "error": err.Error()}) + return + } + if endpointDefinition.DynamicClientRegistrationMode == "user-authenticated" { logger.Warnf("This client requires a dynamic client registration, starting registration process") diff --git a/go.mod b/go.mod index b4c1cc78d..9ba3abb0e 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/dave/jennifer v1.6.1 github.com/dominikbraun/graph v0.15.0 github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 - github.com/fastenhealth/fasten-sources v0.5.13 + github.com/fastenhealth/fasten-sources v0.5.17 github.com/fastenhealth/gofhir-models v0.0.6 github.com/gin-gonic/gin v1.9.0 github.com/go-gormigrate/gormigrate/v2 v2.1.1 diff --git a/go.sum b/go.sum index 76243a3da..315c628d7 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fastenhealth/fasten-sources v0.5.13 h1:FEIMXXwf/KpG4JqsB2J9E2qwIi9jvS2ZBnaqeBXClgs= -github.com/fastenhealth/fasten-sources v0.5.13/go.mod h1:wD94lmBq6F2mIwT2CBF8owU4gO7E1oY2HUX6bbovOXM= +github.com/fastenhealth/fasten-sources v0.5.17 h1:mNyv30uYkJVumIfHe+GcoMFITRT2Z4OrTSntGSCtJ9o= +github.com/fastenhealth/fasten-sources v0.5.17/go.mod h1:wD94lmBq6F2mIwT2CBF8owU4gO7E1oY2HUX6bbovOXM= github.com/fastenhealth/gofhir-models v0.0.6 h1:yJYYaV1eJtHiGEfA1rXLsyOm/9hIi6s2cGoZzGfW1tM= github.com/fastenhealth/gofhir-models v0.0.6/go.mod h1:xB8ikGxu3bUq2b1JYV+CZpHqBaLXpOizFR0eFBCunis= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=