Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve template error reporting (#23396) #23600

Merged
merged 1 commit into from Mar 20, 2023

Conversation

GiteaBot
Copy link
Contributor

Backport #23396 by @zeripath

There are multiple duplicate reports of errors during template rendering due to broken custom templates.

Unfortunately the error returned here is somewhat difficult for users to understand and it doesn't return the context of the error.

This PR attempts to parse the error returned by the template renderer to add in some further context including the filename of the template AND the preceding lines within that template file.

Ref #23274

There are multiple duplicate reports of errors during template rendering
due to broken custom templates.

Unfortunately the error returned here is somewhat difficult for users to
understand and it doesn't return the context of the error.

This PR attempts to parse the error returned by the template renderer to
add in some further context including the filename of the template AND
the preceding lines within that template file.

Ref go-gitea#23274

---------

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 20, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 20, 2023
@delvh delvh added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Mar 20, 2023
@jolheiser jolheiser enabled auto-merge (squash) March 20, 2023 21:02
@delvh delvh added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 20, 2023
@jolheiser jolheiser merged commit a3b9171 into go-gitea:release/v1.19 Mar 20, 2023
2 checks passed
@jolheiser jolheiser removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 20, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
@techknowlogick techknowlogick deleted the backport-23396-v1.19 branch September 9, 2023 05:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/deployment type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants