You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove "permissions" from one of the entities in an otherwise valid configuration file.
Or just misspell "permissions", same result.
Then run dab validate
C:\Temp\dab\Working>dotnet dab validate
Information: Microsoft.DataApiBuilder 1.3.19
Information: Config not provided. Trying to get default config based on DAB_ENVIRONMENT...
Information: Environment variable DAB_ENVIRONMENT is (null)
Information: Validating config file: dab-config.json
Loading config file from C:\Temp\dab\dotnet-template\Api\Working\dab-config.json.
Unhandled exception. System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Azure.DataApiBuilder.Core.Configurations.RuntimeConfigValidator.ValidatePermissionsInConfig(RuntimeConfig runtimeConfig) in /_/src/Core/Configurations/RuntimeConfigValidator.cs:line 733
at Azure.DataApiBuilder.Core.Configurations.RuntimeConfigValidator.TryValidateConfig(String configFilePath, ILoggerFactory loggerFactory) in /_/src/Core/Configurations/RuntimeConfigValidator.cs:line 154
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Cli.ConfigGenerator.IsConfigValid(ValidateOptions options, FileSystemRuntimeConfigLoader loader, IFileSystem fileSystem) in /_/src/Cli/ConfigGenerator.cs:line 1709
at Cli.Commands.ValidateOptions.Handler(ILogger logger, FileSystemRuntimeConfigLoader loader, IFileSystem fileSystem) in /_/src/Cli/Commands/ValidateOptions.cs:line 31
at Cli.Program.<>c__DisplayClass2_0.<Execute>b__5(ValidateOptions options) in /_/src/Cli/Program.cs:line 67
at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,T4,T5,T6,T7,T8,TResult](ParserResult`1 result, Func`2 parsedFunc1, Func`2 parsedFunc2, Func`2 parsedFunc3, Func`2 parsedFunc4, Func`2 parsedFunc5, Func`2 parsedFunc6, Func`2 parsedFunc7, Func`2 parsedFunc8, Func`2 notParsedFunc)
at Cli.Program.Execute(String[] args, ILogger cliLogger, IFileSystem fileSystem, FileSystemRuntimeConfigLoader loader) in /_/src/Cli/Program.cs:line 61
at Cli.Program.Main(String[] args) in /_/src/Cli/Program.cs:line 41
Of all CLI methods, validate should handle exceptions with elegance.
Solution
"Config file is not valid" at a minimum.
"permissions property is required on entity Actor" would be ideal.
The text was updated successfully, but these errors were encountered:
Remove "permissions" from one of the entities in an otherwise valid configuration file.
Then run
dab validate
Of all CLI methods,
validate
should handle exceptions with elegance.Solution
"Config file is not valid" at a minimum.
"
permissions
property is required on entityActor
" would be ideal.The text was updated successfully, but these errors were encountered: