Skip to content

Commit

Permalink
fix: [CDS-99032]: Fix error handling for app project mapping (#569)
Browse files Browse the repository at this point in the history
* improve error handling for gitops and recreate gitops resources if they are deleted

Signed-off-by: Mirko Teodorovic <[email protected]>

* fix: [CDS-99032]: Fix error handling for app project mapping

Signed-off-by: Mirko Teodorovic <[email protected]>

---------

Signed-off-by: Mirko Teodorovic <[email protected]>
  • Loading branch information
mteodor authored Sep 12, 2024
1 parent 60c1317 commit 71f17a9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions harness/nextgen/api_project_mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,18 @@ func (a *ProjectMappingsApiService) AppProjectMappingServiceGetAppProjectMapping
body: localVarBody,
error: localVarHttpResponse.Status,
}

if localVarHttpResponse.StatusCode >= 400 {
var v GatewayruntimeError
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}

if localVarHttpResponse.StatusCode == 200 {
var v V1AppProjectMappingV2
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
Expand Down

0 comments on commit 71f17a9

Please sign in to comment.