Skip to content

Commit

Permalink
fix(engine): dropped api error (#6445)
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Lehtonen <[email protected]>
  • Loading branch information
alrs authored Feb 9, 2023
1 parent e46b6b1 commit a0ed12c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/api/v2_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ func (api *API) getRepositoryHookHandler() ([]service.RbacChecker, service.Handl
func(ctx context.Context, w http.ResponseWriter, req *http.Request) error {
vars := mux.Vars(req)
repoIdentifier, err := url.PathUnescape(vars["repositoryIdentifier"])
if err != nil {
return sdk.NewErrorWithStack(
err,
sdk.NewErrorFrom(sdk.ErrWrongRequest, "invalid given repository identifier"),
)
}
if !sdk.IsValidUUID(repoIdentifier) {
return sdk.NewErrorFrom(sdk.ErrWrongRequest, "this handler needs the repository uuid")
}
Expand Down

0 comments on commit a0ed12c

Please sign in to comment.