-
Notifications
You must be signed in to change notification settings - Fork 16
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
Error when a change doesn't have any revision #52
Comments
avm99963
added a commit
to avm99963/gerrit-monitor
that referenced
this issue
Feb 24, 2024
When a CL doesn't have revisions, the current revision can't be found and thus we can't retrieve the current revision's description. This CL fixes this by returning null in getDescription() when this happens, and falling back to the change's subject in the CL widget. Fixes sdefresne#52
avm99963
added a commit
to avm99963/gerrit-monitor
that referenced
this issue
Feb 24, 2024
When a CL doesn't have revisions, the current revision can't be found and thus we can't retrieve the current revision's description. This CL fixes this by returning null in getDescription() when this happens, and falling back to the change's subject in the CL widget. Fixes sdefresne#52
I mailed a PR with my suggestion in case we find it useful: #53 I tested the change by running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My Gerrit server is answering API requests to
/changes/
with some changes which have therevisions
property empty:This is due to an incomplete/incorrect index, since I just restarted my Gerrit instance and I guess I did it at the worst time. Running
gerrit index changes {ID}
to reindex the changes affected by this fixed the issue.When this error occurs, the popup doesn't show any CLs but instead shows the following error:
TypeError: Cannot read properties of undefined (reading 'commit')
. The error occurs here:gerrit-monitor/src/gerrit.js
Lines 337 to 346 in 5d72c67
Maybe we can consider returning
null
if there aren't any revisions? And then in the CL widget, we could show the subject as a fallback if the description isnull
.The text was updated successfully, but these errors were encountered: