query('currency'); $c = is_string($currency) && $currency !== '' ? $currency : null; try { return ApiResponse::success($catalog->build($c)); } catch (ModelNotFoundException) { return ApiMessage::errorResponse($request, 'effective_config_not_initialized', ErrorCode::NotFound->value, null, 404); } catch (\InvalidArgumentException $e) { if ($e->getMessage() === 'currency') { return ApiMessage::errorResponse($request, 'invalid_or_disabled_currency', ErrorCode::ConfigCurrencyInvalid->value, null, 400); } throw $e; } } }