feat: add jetstream api router and error envelope

This commit is contained in:
Joseph Doherty
2026-02-23 05:58:34 -05:00
parent 7fe15d7ce1
commit 6d23e89fe8
6 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
namespace NATS.Server.Tests;
public class JetStreamApiRouterTests
{
[Fact]
public async Task Unknown_js_api_subject_returns_structured_error()
{
var response = await JetStreamApiFixture.RequestAsync("$JS.API.BAD", "{}");
response.Error.ShouldNotBeNull();
response.Error!.Code.ShouldBe(404);
}
}