With SDK version 1.3.0 and 1.4.0, HTTP errors like the 404 error are not properly returned, and give an SDK error instead.
Steps to reproduce
package main
import (
"context"
"log"
"os"
novugo "github.com/novuhq/novu-go"
)
func main() {
apiKey := os.Getenv("NOVU_API_KEY")
client := novugo.New(novugo.WithSecurity(apiKey))
_, err := client.Workflows.Get(context.Background(), "non-existent-workflow", nil, nil)
if err != nil {
log.Fatal(err)
}
}
Expected :
"404 error" or equivalent
Actual :
error reading response body: file already closed``