Skip to content

Commit

Permalink
fix: catch more network errors
Browse files Browse the repository at this point in the history
- prevent dupe account names in Catalan
  • Loading branch information
18alantom committed Sep 20, 2022
1 parent 11a10a8 commit 69bf6a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export function rendererLog(main: Main, ...args: unknown[]) {
export function isNetworkError(error: Error) {
switch (error?.message) {
case 'net::ERR_INTERNET_DISCONNECTED':
case 'net::ERR_NETWORK_CHANGED':
case 'net::ERR_PROXY_CONNECTION_FAILED':
case 'net::ERR_CONNECTION_RESET':
case 'net::ERR_CONNECTION_CLOSE':
case 'net::ERR_NAME_NOT_RESOLVED':
case 'net::ERR_TIMED_OUT':
case 'net::ERR_CONNECTION_TIMED_OUT':
return true;
default:
Expand Down
2 changes: 1 addition & 1 deletion translations/ca-ES.csv
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ Role,Rol,
"Round Off Account","Round Off Account",
Salary,Salari,
Sales,Vendes,
"Sales Expenses",Vendes,
"Sales Expenses","Despeses de vendes",
"Sales Invoice",,
"Sales Invoice Item",,
"Sales Invoice Settings",,
Expand Down

0 comments on commit 69bf6a0

Please sign in to comment.