portainer/portainer · error

Invalid ResourceID

Error message

Invalid ResourceID

What it means

Error "Invalid ResourceID" thrown in portainer/portainer.

Source

Thrown at api/http/handler/webhooks/webhook_create.go:27

	"github.com/portainer/portainer/api/internal/registryutils/access"
	httperror "github.com/portainer/portainer/pkg/libhttp/error"
	"github.com/portainer/portainer/pkg/libhttp/request"
	"github.com/portainer/portainer/pkg/libhttp/response"

	"github.com/google/uuid"
)

type webhookCreatePayload struct {
	ResourceID string
	EndpointID portainer.EndpointID
	RegistryID portainer.RegistryID
	// Type of webhook (1 - service)
	WebhookType portainer.WebhookType
}

func (payload *webhookCreatePayload) Validate(r *http.Request) error {
	if len(payload.ResourceID) == 0 {
		return errors.New("Invalid ResourceID")
	}
	if payload.EndpointID == 0 {
		return errors.New("Invalid EndpointID")
	}
	if payload.WebhookType != portainer.ServiceWebhook {
		return errors.New("Invalid WebhookType")
	}
	return nil
}

// @summary Create a webhook
// @description **Access policy**: authenticated
// @security ApiKeyAuth
// @security jwt
// @tags webhooks
// @accept json
// @produce json
// @param body body webhookCreatePayload true "Webhook data"

View on GitHub (pinned to 17e74456ff)

When it happens

Trigger: Thrown at api/http/handler/webhooks/webhook_create.go:27 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26). Data as JSON: /api/errors/fcc5016d75075289. Report an issue: GitHub.