Skip to content

Commit

Permalink
Merge pull request #99 from labd/fix/404-responses
Browse files Browse the repository at this point in the history
fix: fixed 404 response codes not being returned
  • Loading branch information
demeyerthom authored Mar 21, 2024
2 parents 1caec9b + 2b11e6e commit 0428fb8
Show file tree
Hide file tree
Showing 682 changed files with 5,605 additions and 769 deletions.
3 changes: 3 additions & 0 deletions .changes/unreleased/Fixed-20240321-105612.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Fixed
body: Regenerated sdk with 404 response codes
time: 2024-03-21T10:56:12.148641307+01:00
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ tasks:

generate:
cmds:
- task: generate-checkout
# - task: generate-checkout
- task: generate-connect
- task: generate-importapi
- task: generate-frontend
# - task: generate-frontend
# - task: generate-ml
- task: generate-platform
- task: generate-history
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet) Execute(
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead) Execute
return err
}
return errorObj

case 404:
return ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodGet) Execute(ctx context.Context)
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodHead) Execute(ctx context.Context
return err
}
return errorObj

case 404:
return ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func (rb *ByProjectKeyApiClientsByIDRequestMethodDelete) Execute(ctx context.Con
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func (rb *ByProjectKeyApiClientsByIDRequestMethodGet) Execute(ctx context.Contex
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (rb *ByProjectKeyApiClientsByIDRequestMethodHead) Execute(ctx context.Conte
return err
}
return errorObj

case 404:
return ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (rb *ByProjectKeyApiClientsRequestMethodGet) Execute(ctx context.Context) (
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (rb *ByProjectKeyApiClientsRequestMethodHead) Execute(ctx context.Context)
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func (rb *ByProjectKeyApiClientsRequestMethodPost) Execute(ctx context.Context)
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (rb *ByProjectKeyOrdersEditsByIDApplyRequestMethodPost) Execute(ctx context
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func (rb *ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKey
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ func (rb *ByProjectKeyAssociateRolesByIDRequestMethodDelete) Execute(ctx context
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAssociateRolesByIDRequestMethodGet) Execute(ctx context.Co
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func (rb *ByProjectKeyAssociateRolesByIDRequestMethodHead) Execute(ctx context.C
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAssociateRolesByIDRequestMethodPost) Execute(ctx context.C
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (rb *ByProjectKeyAssociateRolesRequestMethodGet) Execute(ctx context.Contex
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (rb *ByProjectKeyAssociateRolesRequestMethodHead) Execute(ctx context.Conte
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func (rb *ByProjectKeyAssociateRolesKeyByKeyRequestMethodDelete) Execute(ctx con
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAssociateRolesKeyByKeyRequestMethodGet) Execute(ctx contex
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func (rb *ByProjectKeyAssociateRolesKeyByKeyRequestMethodHead) Execute(ctx conte
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAssociateRolesKeyByKeyRequestMethodPost) Execute(ctx conte
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func (rb *ByProjectKeyAssociateRolesRequestMethodPost) Execute(ctx context.Conte
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ func (rb *ByProjectKeyAttributeGroupsByIDRequestMethodDelete) Execute(ctx contex
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (rb *ByProjectKeyAttributeGroupsByIDRequestMethodGet) Execute(ctx context.C
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func (rb *ByProjectKeyAttributeGroupsByIDRequestMethodHead) Execute(ctx context.
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func (rb *ByProjectKeyAttributeGroupsByIDRequestMethodPost) Execute(ctx context.
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ func (rb *ByProjectKeyAttributeGroupsRequestMethodGet) Execute(ctx context.Conte
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (rb *ByProjectKeyAttributeGroupsRequestMethodHead) Execute(ctx context.Cont
switch resp.StatusCode {
case 200:
return nil

case 404:
return ErrNotFound
case 400:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ func (rb *ByProjectKeyAttributeGroupsKeyByKeyRequestMethodDelete) Execute(ctx co
return nil, err
}
return nil, errorObj

case 404:
return nil, ErrNotFound
case 500:
errorObj := ErrorResponse{}
err = json.Unmarshal(content, &errorObj)
Expand Down
Loading

0 comments on commit 0428fb8

Please sign in to comment.