Skip to content

Commit

Permalink
Fix some error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
floogulinc committed Feb 20, 2025
1 parent a984725 commit fb22b6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/error.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class ErrorService {
}

handleHydrusHttpError(error: HttpErrorResponse, message = 'Error') {
if(typeof error.error === 'object' && 'error' in error.error) {
if(error.error && typeof error.error === 'object' && 'error' in error.error) {
const hydrusError: HydrusError = error.error;
const errorString = hydrusError.error.split('\n')[0];
return this.displayError(error, message, errorString);
Expand All @@ -65,7 +65,7 @@ export class ErrorService {
}

handleHydrusError(error: HttpErrorResponse | Error | unknown, message = 'Error') {
if(!(error instanceof HttpErrorResponse)) {
if(!error || !(error instanceof HttpErrorResponse)) {
return this.handleError(error);
} else {
return this.handleHydrusHttpError(error, message);
Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<meta name="msapplication-config" content="browserconfig.xml">

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">

<link href="assets/splashscreens/iphone5_splash.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="assets/splashscreens/iphone6_splash.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
Expand Down

0 comments on commit fb22b6b

Please sign in to comment.