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
F14094236: D19558.diff
Mon, Nov 25, 2:50 PM
F14090472: D19558.diff
Sun, Nov 24, 6:11 PM
Unknown Object (File)
Fri, Nov 22, 5:33 AM
Unknown Object (File)
Wed, Nov 20, 10:35 PM
Unknown Object (File)
Wed, Nov 20, 6:16 PM
Unknown Object (File)
Sun, Nov 17, 1:04 PM
Unknown Object (File)
Oct 18 2024, 8:42 PM
Unknown Object (File)
Oct 12 2024, 12:57 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
Branch
getrecentcommitsbypath_not_found
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 20559
Build 27925: Run Core Tests
Build 27924: arc lint + arc unit

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.