Page MenuHomePhabricator

Diffusion should raise a reasonable error when the default branch does not exist
Closed, ResolvedPublic

Description

One repository overview page in diffusion throws a

Unhandled Exception ("ConduitException")
ERR-INVALID-COMMIT

This repository worked previously, but I didn't check it after I updated Phabricator both this past weekend and yesterday. All other repository overview pages are fine.

Event Timeline

This probably actually means "The default branch for this repository does not exist." -- e.g., it was trying to expand "master" to a commit hash and failed. Is that consistent with the repository as configured? We should certainly be more graceful about this.

Yes, the issue was I deleted the remote branch marked as default without realizing it.

Okay, cool. We should obviously improve this, but that sort of scenario should be rare. Thanks for the report!

@hlau, is it possible you're hitting the same issue? (Repository configured with a "default branch" which does not exist.)

Yes! By any chance the error message can give some hint about which branch is problematic?

Yeah, we'll fix the error message. Definitely not good right now.

D7429 improves this substantially, but doesn't quite resolve it.

epriestley renamed this task from 'ERR-INVALID-COMMIT' on /diffusion/NAME/ to Diffusion should raise a reasonable error when the default branch does not exist.Oct 27 2013, 4:54 AM
chad changed the visibility from "All Users" to "Public (No Login Required)".Jul 3 2015, 5:22 AM

I think this was resolved at some point -- this is the behavior at HEAD, which seems broadly reasonable:

Screen Shot 2016-03-07 at 9.16.23 AM.png (843×1 px, 125 KB)

In theory, we could show other branches, etc., but you should probably reconfigure the repository anyway.

epriestley claimed this task.

This behavior seems reasonable at HEAD and we haven't seen other issues with it.