Azure / Azure/data-api-builder

🥕[Bug]: Incorrect (or at least useful for debugging) message

Open
#2,538 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

## Output

```
C:\Temp\demo>dab start
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)
Loading config file from C:\Temp\demo\dab-config.json.
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Azure.DataApiBuilder.Config.ObjectModel.RuntimeConfig..ctor(String Schema, DataSource DataSource, RuntimeEntities Entities, RuntimeOptions Runtime, DataSourceFiles DataSourceFiles) in /_/src/Config/ObjectModel/RuntimeConfig.cs:line 201
at .ctor(Object[])
at System.Text.Json.Serialization.Converters.LargeObjectWithParameterizedConstructorConverter`1.CreateObject(ReadStackFrame& frame)
at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
```

## Problem
```
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
```

This error is because there one extra comma in the JSON file making it invalid. This error gives no guidance to the developer to help them understand where to start fixing the problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.