Skip to content

Commit

Permalink
update fasten-sources. Make sure we correctly handle error when endpo…
Browse files Browse the repository at this point in the history
…int not found.
  • Loading branch information
AnalogJ committed Feb 12, 2024
1 parent 4f986e9 commit d450f8b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions backend/pkg/web/handler/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit d450f8b

Please sign in to comment.