bug: Adding a repository with non-existent branch returns error stating main
is invalid branch.
#5713
Labels
type/bug
Something isn't working as expected
Component
API Server / GraphQL
Infrahub version
1.1.6
Current Behavior
If you add a repository with a different
ref/default_branch
other thanmain
that does not exist, the import fails, but provides an error message stating thatmain
is not a valid branch for the repository.This seems to be limited to a
CoreReadOnlyRepository
as we get the expected error message on aCoreRepository
.Expected Behavior
Proper branch in the final error message and maybe a cleaner error message rather than a traceback (This might be due to additional logging I have setup using
dev.start
).Steps to Reproduce
invoke demo.start
infrahubctl repository add test https://github.com/opsmill/infrahub-demo-dc-fabric.git --ref develop --read-only
or manually create the read-only repository in the UI with a branch that doesn't exist.Additional Information
No response
The text was updated successfully, but these errors were encountered: