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
F18789680: D19558.id46761.diff
Wed, Oct 15, 10:36 AM
F18708462: D19558.id.diff
Sun, Sep 28, 9:40 PM
F18697654: D19558.diff
Sat, Sep 27, 9:58 AM
F18509720: D19558.id.diff
Sep 5 2025, 3:34 AM
F18503068: D19558.diff
Sep 4 2025, 10:50 PM
F18460199: D19558.diff
Sep 1 2025, 6:47 PM
F18208435: D19558.id.diff
Aug 18 2025, 9:03 PM
F18194398: D19558.diff
Aug 17 2025, 9:51 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.