Improve error messaging for Gitea access issues
- Add more descriptive error messages for Gitea server access problems - Indicate potential causes: private repository or server configuration - Help users understand why online template updates may not work - Maintain functionality with local fallback
This commit is contained in:
parent
abd4156a88
commit
e2cf7bfe9b
@ -1543,7 +1543,7 @@ class DeclarationTVA_PDF
|
|||||||
if (file_exists($local_manifest)) {
|
if (file_exists($local_manifest)) {
|
||||||
$manifest_content = file_get_contents($local_manifest);
|
$manifest_content = file_get_contents($local_manifest);
|
||||||
// Set a note that we're using local manifest
|
// Set a note that we're using local manifest
|
||||||
$update_info['error'] = 'Using local manifest (Gitea server not accessible)';
|
$update_info['error'] = 'Using local manifest (Gitea server not accessible - repository may be private or server configuration issue)';
|
||||||
}
|
}
|
||||||
if ($manifest_content === false) {
|
if ($manifest_content === false) {
|
||||||
$update_info['error'] = 'Failed to fetch manifest from Gitea and local file not found';
|
$update_info['error'] = 'Failed to fetch manifest from Gitea and local file not found';
|
||||||
@ -1603,7 +1603,7 @@ class DeclarationTVA_PDF
|
|||||||
if (file_exists($local_template)) {
|
if (file_exists($local_template)) {
|
||||||
$template_content = file_get_contents($local_template);
|
$template_content = file_get_contents($local_template);
|
||||||
// Note that we're using local template
|
// Note that we're using local template
|
||||||
$this->error = 'Using local template (Gitea server not accessible)';
|
$this->error = 'Using local template (Gitea server not accessible - repository may be private or server configuration issue)';
|
||||||
}
|
}
|
||||||
if ($template_content === false) {
|
if ($template_content === false) {
|
||||||
$this->error = 'Failed to download template from Gitea and local file not found';
|
$this->error = 'Failed to download template from Gitea and local file not found';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user