mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: reggie-k <[email protected]> Signed-off-by: Regina Voloshin <[email protected]> Co-authored-by: Nitish Kumar <[email protected]> Co-authored-by: dudinea <[email protected]>
24 lines
676 B
Go
24 lines
676 B
Go
package pull_request
|
|
|
|
import "errors"
|
|
|
|
// RepositoryNotFoundError represents an error when a repository is not found by a pull request provider
|
|
type RepositoryNotFoundError struct {
|
|
causingError error
|
|
}
|
|
|
|
func (e *RepositoryNotFoundError) Error() string {
|
|
return e.causingError.Error()
|
|
}
|
|
|
|
// NewRepositoryNotFoundError creates a new repository not found error
|
|
func NewRepositoryNotFoundError(err error) error {
|
|
return &RepositoryNotFoundError{causingError: err}
|
|
}
|
|
|
|
// IsRepositoryNotFoundError checks if the given error is a repository not found error
|
|
func IsRepositoryNotFoundError(err error) bool {
|
|
var repoErr *RepositoryNotFoundError
|
|
return errors.As(err, &repoErr)
|
|
}
|