From 94e34b1f490d28b9c8a2dbd0cd4b3ebc2b8f38e0 Mon Sep 17 00:00:00 2001 From: adranwit Date: Fri, 16 Aug 2024 10:19:34 -0700 Subject: [PATCH] updated error handling --- service/operator/async.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/operator/async.go b/service/operator/async.go index 693c38ac..e3debf49 100644 --- a/service/operator/async.go +++ b/service/operator/async.go @@ -79,6 +79,7 @@ func (s *Service) updateJobStatusDone(ctx context.Context, aComponent *repositor } var queryParameter = state.NewParameter("Query", state.NewQueryLocation(""), state.WithParameterSchema(state.NewSchema(reflect.TypeOf("")))) +var textLimit = 63 * 1024 func (s *Service) buildJob(ctx context.Context, aSession *session.Session, aState *structology.State, aComponent *repository.Component, matchKey string, options *session.Options) (*async.Job, error) { asyncModule := aComponent.Async @@ -93,6 +94,9 @@ func (s *Service) buildJob(ctx context.Context, aSession *session.Session, aStat if err != nil { return nil, err } + if len(encodedState) > textLimit { + encodedState = encodedState[:textLimit] + } UUID, err := uuid.NewUUID() if err != nil { return nil, err