You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
request.Spec.SpecError=sdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("Cannot respond to multiplexed requests, as CQRS type is invalid. This should have been caught at startup. Bad.")).ToStatus()
181
+
request.Spec.SpecError=sdkv2betalib.ErrServerInternal.WithSpecDetail(request.Spec).WithInternalErrorDetail(errors.New("Cannot respond to multiplexed requests, as CQRS type is invalid. This should have been caught at startup. Bad.")).ToStatus()
request.Spec.SpecError=sdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("Found error when publishing"), err).ToStatus()
189
+
request.Spec.SpecError=sdkv2betalib.ErrServerInternal.WithSpecDetail(request.Spec).WithInternalErrorDetail(errors.New("Found error when publishing"), err).ToStatus()
returnsdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("failed to publish")).WithInternalErrorDetail(err)
151
+
returnsdkv2betalib.ErrServerInternal.WithSpecDetail(s).WithInternalErrorDetail(errors.New("failed to publish")).WithInternalErrorDetail(err)
152
152
}
153
153
154
154
// Subscribe to streamed results
155
155
log.Debug("Waiting on results from "+responseSubject)
156
156
sub, err:=nats.SubscribeSync(responseSubject)
157
157
iferr!=nil {
158
-
returnsdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("could not subscribe stream sync to nats")).WithInternalErrorDetail(err)
158
+
returnsdkv2betalib.ErrServerInternal.WithSpecDetail(s).WithInternalErrorDetail(errors.New("could not subscribe stream sync to nats")).WithInternalErrorDetail(err)
159
159
}
160
160
161
161
defersub.Unsubscribe()
@@ -166,17 +166,17 @@ func MultiplexEventStreamSync[T any](ctx context.Context, s *specv2pb.Spec, even
166
166
iferrors.Is(err1, context.Canceled) {
167
167
returnnil
168
168
}
169
-
returnsdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("could not process additional events")).WithInternalErrorDetail(err1)
169
+
returnsdkv2betalib.ErrServerInternal.WithSpecDetail(s).WithInternalErrorDetail(errors.New("could not process additional events")).WithInternalErrorDetail(err1)
170
170
}
171
171
172
172
converted, err1:=convert(msg)
173
173
iferr1!=nil {
174
-
returnsdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("could not convert event")).WithInternalErrorDetail(err1)
174
+
returnsdkv2betalib.ErrServerInternal.WithSpecDetail(s).WithInternalErrorDetail(errors.New("could not convert event")).WithInternalErrorDetail(err1)
175
175
}
176
176
177
177
err1=stream.Send(converted)
178
178
iferr!=nil {
179
-
returnsdkv2betalib.ErrServerInternal.WithInternalErrorDetail(errors.New("could not stream event")).WithInternalErrorDetail(err1)
179
+
returnsdkv2betalib.ErrServerInternal.WithSpecDetail(s).WithInternalErrorDetail(errors.New("could not stream event")).WithInternalErrorDetail(err1)
0 commit comments