Skip to content

Handle empty HTTP response in versionCheck#41

Merged
MonkeyWhisper merged 2 commits into
Project-Sloth:mainfrom
jonjongames1997:main
May 19, 2026
Merged

Handle empty HTTP response in versionCheck#41
MonkeyWhisper merged 2 commits into
Project-Sloth:mainfrom
jonjongames1997:main

Conversation

@jonjongames1997
Copy link
Copy Markdown
Contributor

Return early in the PerformHttpRequest callback when the response body is nil or not a string to avoid runtime errors when iterating with string.gmatch. Adds a debug log including the error info and prevents further processing of an empty/invalid remote response.

Return early in the PerformHttpRequest callback when the response body is nil or not a string to avoid runtime errors when iterating with string.gmatch. Adds a debug log including the error info and prevents further processing of an empty/invalid remote response.
Add robust version parsing and comparison utilities (ps._splitVersion, ps._compareVersions) and refactor ps.versionCheck to validate inputs, fetch and parse remote version tokens (handles "Newest Build:" and semantic version patterns), compare installed vs remote versions, and log appropriate messages. Supports an opts.showChangelog flag to optionally display changelog lines and includes a convenience example call. Improved error handling and clearer debug/warn/info output.
@MonkeyWhisper MonkeyWhisper merged commit 05a49bc into Project-Sloth:main May 19, 2026
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