Skip to content

Commit

Permalink
Update pkg/proxy/proxy.go
Browse files Browse the repository at this point in the history
Co-authored-by: Alexey Kazakov <[email protected]>
  • Loading branch information
filariow and alexeykazakov authored Aug 28, 2024
1 parent 6f97b34 commit 7934119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ func (p *Proxy) checkUserIsProvisionedAndSpaceExists(ctx echo.Context, userID, u
func (p *Proxy) checkSpaceExists(workspaceName string) error {
if _, err := p.app.InformerService().GetSpace(workspaceName); err != nil {
// log the actual error but do not return it so that it doesn't reveal information about a space that may not belong to the requestor
log.Errorf(nil, err, "requested space '%s' is not available", workspaceName)
return fmt.Errorf("the requested space is not available")
log.Errorf(nil, err, "requested space '%s' does not exist", workspaceName)
return fmt.Errorf("access to workspace '%s' is forbidden", workspaceName)
}
return nil
}
Expand Down

0 comments on commit 7934119

Please sign in to comment.