HomePhabricator

Gracefully fail request if non existing callsign is passed to…

Description

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

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

Reviewers: Pawka, epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D19558