Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
9c527e3f
Unverified
Commit
9c527e3f
authored
1 year ago
by
Jed Fox
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve messaging when the API fails to download a file (#1396)
parent
b8c90aa8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
packages/loot-core/src/server/api.ts
+1
-0
1 addition, 0 deletions
packages/loot-core/src/server/api.ts
packages/loot-core/src/shared/errors.ts
+4
-3
4 additions, 3 deletions
packages/loot-core/src/shared/errors.ts
upcoming-release-notes/1396.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/1396.md
with
11 additions
and
3 deletions
packages/loot-core/src/server/api.ts
+
1
−
0
View file @
9c527e3f
...
...
@@ -204,6 +204,7 @@ handlers['api/download-budget'] = async function ({ syncId, password }) {
let
result
=
await
handlers
[
'
download-budget
'
]({
fileId
:
file
.
fileId
});
if
(
result
.
error
)
{
console
.
log
(
'
Full error details
'
,
result
.
error
);
throw
new
Error
(
getDownloadError
(
result
.
error
));
}
await
handlers
[
'
load-budget
'
]({
id
:
result
.
id
});
...
...
This diff is collapsed.
Click to expand it.
packages/loot-core/src/shared/errors.ts
+
4
−
3
View file @
9c527e3f
...
...
@@ -51,10 +51,11 @@ export function getDownloadError({ reason, meta, fileName }) {
);
default
:
let
info
=
meta
&&
meta
.
fileId
?
`
(
fileId:
${
meta
.
fileId
}
)
`
:
''
;
let
info
=
meta
&&
meta
.
fileId
?
`
,
fileId:
${
meta
.
fileId
}
`
:
''
;
return
(
'
Something went wrong trying to download that file, sorry! Visit https://actualbudget.org/contact/ for support.
'
+
info
'
Something went wrong trying to download that file, sorry!
'
+
'
Visit https://actualbudget.org/contact/ for support.
'
+
`(reason:
${
reason
}${
info
}
)`
);
}
}
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/1396.md
0 → 100644
+
6
−
0
View file @
9c527e3f
---
category
:
Enhancements
authors
:
[
j-f1
]
---
Improve error messaging when the API package fails to download a file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment