Skip to content

feat: actionable HTTP and license-file permission errors#16

Merged
TobbenTM merged 1 commit into
mainfrom
permissions-and-error-handling
Jun 26, 2026
Merged

feat: actionable HTTP and license-file permission errors#16
TobbenTM merged 1 commit into
mainfrom
permissions-and-error-handling

Conversation

@TobbenTM

Copy link
Copy Markdown
Member

HTTP and license-file failures now carry the file path, the OS reason (errno), and the request URL instead of vague one-liners, so permission and connectivity problems are diagnosable in the field. The previously-unguarded create_directories call is wrapped in storage_error (it used to escape as a raw filesystem_error), and a post-write stream check catches a failed write such as a full disk. An unparseable license file is now deleted and reported as no stored license, so a fresh activation can be written on top instead of throwing on every load. The JUCE transport puts the macOS/iOS network-entitlement hint in api_error detail, and the controller routes the full reason to onDiagnostic while keeping user-facing screen text friendly and fixed. The core header changes are mirrored into modules/moonbase_licensing/moonbase (sync gate green) and covered by tests for the directory-collision regression, unreadable file, read-only dir, corrupt-file deletion, and dev-only hint routing.

Storage and transport failures now carry the file path, the OS reason
(errno), and the request URL instead of vague one-liners, so permission
and connectivity problems are diagnosable in the field.

- store.hpp: wrap the previously-unguarded create_directories call in
  storage_error (it used to escape as a raw filesystem_error), include the
  path + errno in read/write/delete messages, and verify the post-write
  stream state so a failed write (disk full) is not silently lost.
- store.hpp: delete an unparseable license file and report no stored
  license, so a fresh activation can be written on top instead of throwing
  on every load.
- http_curl.hpp / juce_http_transport.h: prepend the request URL; the JUCE
  transport puts the macOS/iOS network-entitlement hint in api_error detail.
- ActivationController: route the full reason (incl. the entitlement hint)
  to onDiagnostic via a describeError helper while keeping user-facing
  screen text friendly and fixed.
- Mirror the core header changes into modules/moonbase_licensing/moonbase
  so standalone JUCE-module consumers get the same errors (sync gate green).
- Tests cover the directory-collision regression, unreadable file /
  read-only dir, corrupt-file deletion, and dev-only hint routing.
@argos-ci

argos-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jun 26, 2026, 2:27 PM

@TobbenTM TobbenTM merged commit 91523c2 into main Jun 26, 2026
11 checks passed
github-actions Bot pushed a commit that referenced this pull request Jun 26, 2026
# [3.2.0](v3.1.0...v3.2.0) (2026-06-26)

### Bug Fixes

* sync package-lock.json so the release workflow's npm ci succeeds ([#17](#17)) ([8f606b3](8f606b3)), closes [#14](#14)

### Features

* actionable HTTP and license-file permission errors ([#16](#16)) ([91523c2](91523c2))
* moonbase_licensing JUCE 8 module with native activation UI ([#14](#14)) ([2c434a6](2c434a6)), closes [hi#contrast](https://github.com/hi/issues/contrast)
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant