@@ -182,7 +182,7 @@ func (s *APIDocumentation) CreateAPIDocument(ctx context.Context, apiID string,
182182
183183 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
184184 return nil , err
185- } else if utils .MatchStatusCodes ([]string {"400" , "401" , "403" , "404" , "409" , "415" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
185+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
186186 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
187187 if err != nil {
188188 return nil , err
@@ -522,7 +522,7 @@ func (s *APIDocumentation) ListAPIDocuments(ctx context.Context, apiID string, f
522522
523523 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
524524 return nil , err
525- } else if utils .MatchStatusCodes ([]string {"400" , "401" , "403" , "404" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
525+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
526526 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
527527 if err != nil {
528528 return nil , err
@@ -816,7 +816,7 @@ func (s *APIDocumentation) FetchAPIDocument(ctx context.Context, apiID string, d
816816
817817 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
818818 return nil , err
819- } else if utils .MatchStatusCodes ([]string {"401" , "403" , "404" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
819+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
820820 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
821821 if err != nil {
822822 return nil , err
@@ -1091,7 +1091,7 @@ func (s *APIDocumentation) UpdateAPIDocument(ctx context.Context, request operat
10911091
10921092 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
10931093 return nil , err
1094- } else if utils .MatchStatusCodes ([]string {"400" , "401" , "403" , "404" , "409" , "415" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
1094+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
10951095 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
10961096 if err != nil {
10971097 return nil , err
@@ -1427,7 +1427,7 @@ func (s *APIDocumentation) DeleteAPIDocument(ctx context.Context, apiID string,
14271427
14281428 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
14291429 return nil , err
1430- } else if utils .MatchStatusCodes ([]string {"401" , "403" , "404" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
1430+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
14311431 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
14321432 if err != nil {
14331433 return nil , err
@@ -1683,7 +1683,7 @@ func (s *APIDocumentation) MoveAPIDocument(ctx context.Context, request operatio
16831683
16841684 _ , err = s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, nil , err )
16851685 return nil , err
1686- } else if utils .MatchStatusCodes ([]string {"401" , "403" , "404" , "409" , " 4XX" , "5XX" }, httpRes .StatusCode ) {
1686+ } else if utils .MatchStatusCodes ([]string {"4XX" , "5XX" }, httpRes .StatusCode ) {
16871687 _httpRes , err := s .hooks .AfterError (hooks.AfterErrorContext {HookContext : hookCtx }, httpRes , nil )
16881688 if err != nil {
16891689 return nil , err
0 commit comments