Error codes in Firefly III API

This commit is contained in:
James Cole
2019-11-02 08:19:50 +01:00
parent 2ea1852a94
commit d749d550ee
9 changed files with 31 additions and 25 deletions

View File

@@ -79,10 +79,10 @@ class CurrencyExchangeRateController extends Controller
$toCurrency = $this->repository->findByCodeNull($request->get('to') ?? 'USD');
if (null === $fromCurrency) {
throw new FireflyException(trans('api.error_unknown_source_currency'));
throw new FireflyException('200007: Unknown source currency');
}
if (null === $toCurrency) {
throw new FireflyException(trans('api.error_unknown_destination_currency'));
throw new FireflyException('200007: Unknown destination currency');
}
/** @var Carbon $dateObj */