update fasten-sources. Make sure we correctly handle error when endpoint not found.

This commit is contained in:
Jason Kulatunga 2024-02-12 10:23:30 -08:00
parent 4f986e9c2c
commit d450f8b4e4
No known key found for this signature in database
3 changed files with 10 additions and 3 deletions

View File

@ -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")

2
go.mod
View File

@ -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

4
go.sum
View File

@ -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=