mirror of
https://github.com/pelican-dev/plugins.git
synced 2026-05-09 08:26:01 +02:00
[PR #90] [MERGED] fix subdomain edit and improved error handling #106
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/plugins#106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pelican-dev/plugins/pull/90
Author: @TinyMemoria
Created: 1/26/2026
Status: ✅ Merged
Merged: 1/26/2026
Merged by: @Boy132
Base:
main← Head:main📝 Commits (3)
d0b827efix subdomain edit and improved error handlinga584e79changed variable to camelCase and response handling10ac7c5cleanup📊 Changes
2 files changed (+46 additions, -25 deletions)
View changed files
📝
subdomains/src/Models/Subdomain.php(+33 -22)📝
subdomains/src/Services/SubdomainService.php(+13 -3)📄 Description
Fixes: #87
Fixed the Edit workflow so that editing a subdomain updates Cloudflare correctly and does not delete the record on failure (some improved error handling).
Previous:
When you edit a subdomain name, the plugin calls Cloudflare in a way that incorrectly treats the existing record as a conflict. Throws exception, and deletes record.
Now:
When you edit a subdomain name, the plugin queries Cloudflare records by name and type, then checks each record ID, if record has a different ID, an exception is thrown, otherwise update the record.
Additional error handling:
If New Subdomain is created for the first time and there is an error, delete the record (as previous).
If Subdomain is being edited and there is an error, keep the record, as to not remove a current working record.
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.