return appropriate response from within catch

This commit is contained in:
David Bomba 2020-08-04 23:53:33 +10:00
parent 25d1bdc626
commit b89ee61bba

View File

@ -79,6 +79,8 @@ class SelfUpdateController extends BaseController
} }
catch(GitException $e) { catch(GitException $e) {
info($e->getMessage()); info($e->getMessage());
return response()->json(['message'=>$e->getMessage()], 500);
} }
info("Are there any changes to pull? " . $repo->hasChanges()); info("Are there any changes to pull? " . $repo->hasChanges());