Showing
3 changed files
with
15 additions
and
0 deletions
| ... | @@ -119,6 +119,12 @@ const getCharacterInfo = async function(nickname, characterCode) { | ... | @@ -119,6 +119,12 @@ const getCharacterInfo = async function(nickname, characterCode) { |
| 119 | } | 119 | } |
| 120 | }); | 120 | }); |
| 121 | 121 | ||
| 122 | + stats.major = 0; | ||
| 123 | + | ||
| 124 | + if (stats.major == 0) { | ||
| 125 | + throw new Error("no_major_stats") | ||
| 126 | + } | ||
| 127 | + | ||
| 122 | return { | 128 | return { |
| 123 | character: character, | 129 | character: character, |
| 124 | stats: stats | 130 | stats: stats |
| ... | @@ -129,6 +135,8 @@ const getCharacterInfo = async function(nickname, characterCode) { | ... | @@ -129,6 +135,8 @@ const getCharacterInfo = async function(nickname, characterCode) { |
| 129 | return -1; | 135 | return -1; |
| 130 | else if (error.message == "game_checking") | 136 | else if (error.message == "game_checking") |
| 131 | return -2; | 137 | return -2; |
| 138 | + else if (error.message == "no_major_stats") | ||
| 139 | + return -3; | ||
| 132 | else | 140 | else |
| 133 | return -999; | 141 | return -999; |
| 134 | } | 142 | } | ... | ... |
| ... | @@ -28,6 +28,10 @@ module.exports = { | ... | @@ -28,6 +28,10 @@ module.exports = { |
| 28 | // 점검중 | 28 | // 점검중 |
| 29 | res.status(503).send(); | 29 | res.status(503).send(); |
| 30 | return; | 30 | return; |
| 31 | + } else if (characterInfo == -3) { | ||
| 32 | + // 데이터를 받아오지 못함 | ||
| 33 | + res.status(502).send(); | ||
| 34 | + return; | ||
| 31 | } else if (characterInfo < 0) { | 35 | } else if (characterInfo < 0) { |
| 32 | res.status(400).send(); | 36 | res.status(400).send(); |
| 33 | return; | 37 | return; | ... | ... |
| ... | @@ -125,6 +125,9 @@ | ... | @@ -125,6 +125,9 @@ |
| 125 | window.open("https://maplestory.nexon.com/MyMaple/Account/Character/Visibility"); | 125 | window.open("https://maplestory.nexon.com/MyMaple/Account/Character/Visibility"); |
| 126 | }, 2000); | 126 | }, 2000); |
| 127 | break; | 127 | break; |
| 128 | + case 502: | ||
| 129 | + M.toast({html:"메이플스토리로부터 데이터를 받아오지 못했습니다.<br><br>잠시 후에 시도해주세요."}); | ||
| 130 | + break; | ||
| 128 | case 503: | 131 | case 503: |
| 129 | M.toast({html:"메이플스토리가 점검중입니다."}); | 132 | M.toast({html:"메이플스토리가 점검중입니다."}); |
| 130 | break; | 133 | break; | ... | ... |
-
Please register or login to post a comment