Skip to content

Commit 127c3f2

Browse files
CopilotJerryNixon
andcommitted
Improve error message for invalid entity path
Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
1 parent 017aabb commit 127c3f2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Core/Services/RestService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,9 @@ public bool TryGetRestRouteFromConfig([NotNullWhen(true)] out string? configured
465465
}
466466
}
467467

468-
// No entity found
468+
// No entity found - show the full path for better debugging
469469
throw new DataApiBuilderException(
470-
message: $"Invalid Entity path: {segments[0]}.",
470+
message: $"Invalid Entity path: {routeAfterPathBase}.",
471471
statusCode: HttpStatusCode.NotFound,
472472
subStatusCode: DataApiBuilderException.SubStatusCodes.EntityNotFound);
473473
}

0 commit comments

Comments
 (0)