From 92965c6af29aa5c06e36a0fffe69b40f4fa19d6e Mon Sep 17 00:00:00 2001 From: pb Date: Tue, 11 Mar 2025 16:48:05 +0100 Subject: [PATCH] Added more information in error when LaunchPeerExecution method doesn't match caller's --- models/peer/peer_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/peer/peer_cache.go b/models/peer/peer_cache.go index 4b84442..68d3513 100644 --- a/models/peer/peer_cache.go +++ b/models/peer/peer_cache.go @@ -75,7 +75,7 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, dataID string, fmt.Println("Launching peer execution on", caller.URLS, dt, method) methods := caller.URLS[dt] // Get the methods url of the data type if m, ok := methods[method]; !ok || m == "" { - return nil, errors.New("no path found") + return nil, errors.New("Requested method " + method.String() + " not declared in HTTPCaller") } path := methods[method] // Get the path corresponding to the action we want to execute path = strings.ReplaceAll(path, ":id", dataID) // Replace the id in the path in case of a DELETE / UPDATE method (it's a standard naming in OC)