Page MenuHomePhabricator

Gracefully fail request if non existing callsign is passed to getrecentcommitsbypath instead of crashing
ClosedPublic

Authored by artms on Aug 2 2018, 2:45 PM.
Tags
None
Referenced Files
F19790174: D19558.id46760.diff
Wed, Feb 25, 7:17 PM
F19784568: D19558.diff
Tue, Feb 24, 8:29 PM
F19766525: D19558.id46761.diff
Thu, Feb 19, 12:12 PM
F19693286: D19558.diff
Tue, Feb 10, 8:30 AM
F19232737: D19558.id46761.diff
Dec 21 2025, 5:25 PM
F18846993: D19558.id.diff
Oct 29 2025, 10:21 PM
F18841605: D19558.diff
Oct 28 2025, 9:59 AM
F18830196: D19558.id.diff
Oct 25 2025, 4:56 AM
Subscribers

Details

Summary

diffusion.getrecentcommitsbypath fails with 500 error when non existing callsign is passed:

>>> UNRECOVERABLE FATAL ERROR <<<

Call to a member function getCommit() on null

Expected Behavior:
Return more graceful error notifying caller that such callsign/repository does not exist

Reproduction steps:
Open conduit: https://secure.phabricator.com/conduit/method/diffusion.getrecentcommitsbypath/
Enter:
callsign: "obviouslynotexisting"
path: "/random"
Click call method

Test Plan

after applying patch - call no longer fails with 500s

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

artms requested review of this revision.Aug 2 2018, 2:46 PM

This doesn't have any callers and should probably be frozen/deprecated, but this change won't hurt anything.

This revision is now accepted and ready to land.Aug 2 2018, 2:50 PM

Uh, we had couple of cases and this caused extra 500s in logs...

This revision was automatically updated to reflect the committed changes.