Skip to content

Tidy exception reporting up a bit - #500

Merged
KodrAus merged 2 commits into
datalust:devfrom
nblumhardt:tidy-exception-reporting
Sep 8, 2026
Merged

Tidy exception reporting up a bit#500
KodrAus merged 2 commits into
datalust:devfrom
nblumhardt:tidy-exception-reporting

Conversation

@nblumhardt

Copy link
Copy Markdown
Member

Makes error reporting a little more consistent by removing command-specific try/catch blocks wherever I can do that confidently.

Without --verbose:

~/.../seqcli> dotnet run --project src/SeqCli/SeqCli.csproj -- alert create -t test
The command failed: Connection refused (localhost:5341). → Connection refused.

With --verbose:

~/.../seqcli> dotnet run --project src/SeqCli/SeqCli.csproj -- alert create -t test --verbose
The command failed: Connection refused (localhost:5341). → Connection refused.
System.Net.Http.HttpRequestException: Connection refused (localhost:5341)
 ---> System.Net.Sockets.SocketException (61): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)

Diff is easier on the eyes with whitespace ignored.

@KodrAus
KodrAus merged commit 53d6757 into datalust:dev Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants