Skip to content

Commit d625507

Browse files
committed
chore: handle MAL backend failure
1 parent 551ddda commit d625507

File tree

9 files changed

+115
-108
lines changed

9 files changed

+115
-108
lines changed

backend/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "infanf/myanili-backend",
3-
"version": "2.30.3",
3+
"version": "2.30.4",
44
"license": "MIT",
55
"type": "project",
66
"require": {

backend/composer.lock

+100-99
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "myanili-frontend",
3-
"version": "2.30.3",
3+
"version": "2.30.4",
44
"scripts": {
55
"ng": "ng",
66
"dev": "ng serve --host=0.0.0.0",

frontend/src/app/app.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class AppComponent {
2222
this.malService.maintenace().then(isMaintenance => {
2323
if (isMaintenance) {
2424
this.dialogue.open(
25-
'MyAnimeList is currently under maintenance. Please check back later.',
25+
'MyAnimeList is currently under maintenance (or not available due to other reasons). Please check back later.',
2626
'MAL Maintenance',
2727
);
2828
}

frontend/src/app/services/mal.service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ export class MalService {
136136
}
137137

138138
async maintenace(): Promise<boolean> {
139-
const maint = await this.get<{ maintenance?: boolean }>('maintenance');
139+
const maint = await this.get<{ maintenance?: boolean }>('maintenance').catch(() => ({
140+
maintenance: true,
141+
}));
140142
return Boolean(maint.maintenance);
141143
}
142144
}

frontend/src/changelog.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
export const changelog: Changelog = {
22
changes: [
3+
{
4+
version: '2.30.4',
5+
fixes: ['Handle MAL backend failures'],
6+
},
37
{
48
version: '2.30.3',
59
other: ['Update dependencies', 'Update Logos for HIDIVE and Prime Video'],

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "myanili",
3-
"version": "2.30.3",
3+
"version": "2.30.4",
44
"description": "MyAniLi",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1",

0 commit comments

Comments
 (0)