diff --git a/dev-proxy-plugins/MockResponses/CrudApiPlugin.cs b/dev-proxy-plugins/MockResponses/CrudApiPlugin.cs index ab32f551..9747f4cf 100644 --- a/dev-proxy-plugins/MockResponses/CrudApiPlugin.cs +++ b/dev-proxy-plugins/MockResponses/CrudApiPlugin.cs @@ -145,9 +145,10 @@ private void LoadData() { try { - var dataFilePath = Path.GetFullPath(ProxyUtils.ReplacePathTokens(_configuration.DataFile), Path.GetDirectoryName(_proxyConfiguration?.ConfigFile ?? string.Empty) ?? string.Empty); + var dataFilePath = Path.GetFullPath(ProxyUtils.ReplacePathTokens(_configuration.DataFile), Path.GetDirectoryName(_configuration.ApiFile) ?? string.Empty); if (!File.Exists(dataFilePath)) { + _logger?.LogError($"Data file '{dataFilePath}' does not exist. The {_configuration.BaseUrl} API will be disabled."); _configuration.Actions = Array.Empty(); return; }