Improve error handling in API.

This commit is contained in:
James Cole
2019-10-30 20:02:21 +01:00
parent bed182cf13
commit 9a028d5002
18 changed files with 131 additions and 103 deletions

View File

@@ -24,6 +24,7 @@ namespace FireflyIII\Repositories\Bill;
use Carbon\Carbon;
use DB;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\BillFactory;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Note;
@@ -662,9 +663,10 @@ class BillRepository implements BillRepositoryInterface
/**
* @param array $data
*
* @return Bill|null
* @return Bill
* @throws FireflyException
*/
public function store(array $data): ?Bill
public function store(array $data): Bill
{
/** @var BillFactory $factory */
$factory = app(BillFactory::class);