Skip to content

Commit

Permalink
fix(gen): add missing feature check
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Dec 2, 2023
1 parent e498f7e commit 2b83f90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gen/_template/handlers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *{{ if $op.WebhookInfo }}Webhook{{ end }}Server) handle{{ $op.Name }}Req
Err: err,
}
{{- if and $.Config.Error (not $op.WebhookInfo) }}
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, span); encodeErr != nil {
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, {{ if $otel }}span{{ end }}); encodeErr != nil {
recordError({{ printf "Security:%s" $securityName | quote }}, err)
}
{{- else }}
Expand Down Expand Up @@ -140,7 +140,7 @@ func (s *{{ if $op.WebhookInfo }}Webhook{{ end }}Server) handle{{ $op.Name }}Req
Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied,
}
{{- if and $.Config.Error (not $op.WebhookInfo) }}
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, span); encodeErr != nil {
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, {{ if $otel }}span{{ end }}); encodeErr != nil {
recordError({{ quote "Security" }}, err)
}
{{- else }}
Expand Down

0 comments on commit 2b83f90

Please sign in to comment.