Skip to content

Cannot create a topic (v1.4.0) #26

@nicolaslaunaySO

Description

@nicolaslaunaySO

It is not possible to create a topic with the SDK v1.4.0.

Code to reproduce

package main

import (
	"context"
	"log"
	"os"

	novugo "github.com/novuhq/novu-go"
	"github.com/novuhq/novu-go/models/components"
)

func main() {
	apiKey := os.Getenv("NOVU_API_KEY")
	client := novugo.New(novugo.WithSecurity(apiKey))

	_, err := client.Topics.Create(
		context.Background(),
		components.CreateUpdateTopicRequestDto{Key: "test topic 1234"},
		nil,
		nil,
	)
	if err != nil {
		log.Fatal(err)
	}
}

Expected

It works or at least gives a clear error

Actual

error reading response body: http2: response body closed

This is an actual bug, as I can still retrieve other things through the same code (like the list of environments for example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions