We should propagate the error message for writing on a protected branch. Currently the following code, when the main branch is protected, produces an inconclusive error message.
fs = lakefs_spec.LakeFSFileSystem()
df = pd.read_csv("developer-stats.csv")
with fs.transaction as tx:
df.to_csv("lakefs://quickstart/main/dev-stats.csv")
tx.commit(repository="quickstart", branch="main", message="Try to commit")
What is the motivation and/or use case?
We should propagate the error message for writing on a protected branch. Currently the following code, when the main branch is protected, produces an inconclusive error message.
The stack trace is
How can we implement this feature?
Catch the error in the lakeFS error class and print a conclusive error message.