Repository navigation
fix(plugins): Log potential errors in HTTP request callbacks - #6452
Merged
Merged
Conversation
Nerixyz
commented
Sep 6, 2025
| self->cbError = std::nullopt; | ||
| }) | ||
| .finally([mainState, hack]() { | ||
| .finally([pl, hack]() { |
Contributor
Author
There was a problem hiding this comment.
Note: we can just pass the plugin pointer here, because the plugin owns hack (see line 117).
I think, in the future, we could have some more generic plugin handle that we could store here (the plugin shouldn't need to know that HTTP requests exist). We can't put the plugin in a std::shared_ptr itself, but we could make the plugin own some shared pointer. That's for the next release, though.
pajlada
approved these changes
Sep 7, 2025
Member
|
CC @Mm2PL |
Mm2PL
enabled auto-merge (squash)
November 5, 2025 00:52
Pietro228
pushed a commit
to Stream-Ally/streamally-chatterino
that referenced
this pull request
Dec 5, 2025
…ino#6452) Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl> Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
babicekmarek
pushed a commit
to babicekmarek/streamally-chatterino
that referenced
this pull request
Sep 14, 2026
…ino#6452) Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl> Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
babicekmarek
pushed a commit
to babicekmarek/streamally-chatterino
that referenced
this pull request
Sep 14, 2026
…ino#6452) Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl> Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an error occurred in a handler for an HTTP request, it wasn't printed to the console or the REPL (linked issue).
With this PR, the error is printed.
To test this, you can try the code from #6224 (comment) - it should only print "finally" in the chat. It should (with this PR) print an error like
chatterino.lua: [test:Test plugin] HTTPRequest::on_error - (path): attempt to concatenate a nil valuein both the Chatterino log as well the REPL. Before this, there was no output.Fixes #6224.