Skip to content

Commit

Permalink
add accidentally removed comment back
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatali committed Nov 8, 2019
1 parent c12cfcf commit 5a7e260
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions codegen/template_bundle/template_files.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions codegen/templates/http_client.tmpl
Expand Up @@ -334,6 +334,8 @@ func (c *{{$clientName}}) {{$methodName}}(
{{range $code, $exceptions := .ExceptionsByStatusCode -}}
case {{$code}}:
{{- if or (eq $code 204) (eq $code 304) -}}
{{/* If multiple exceptions have 204/304 status code mapped, we aren't able to distinguish between them */}}
{{/* so we'll just return the first exception that has 204/304 status code set. */}}
{{$val := index $exceptions 0}}
return respHeaders, &{{$val.Type}}{}
{{else}}
Expand Down Expand Up @@ -384,6 +386,8 @@ func (c *{{$clientName}}) {{$methodName}}(
{{range $code, $exceptions := .ExceptionsByStatusCode -}}
case {{$code}}:
{{- if or (eq $code 204) (eq $code 304) -}}
{{/* If multiple exceptions have 204/304 status code mapped, we aren't able to distinguish between them */}}
{{/* so we'll just return the first exception that has 204/304 status code set. */}}
{{$val := index $exceptions 0}}
return defaultRes, respHeaders, &{{$val.Type}}{}
{{else}}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a7e260

Please sign in to comment.