Skip to content

Commit

Permalink
Merge pull request #48 from Chit132/dev
Browse files Browse the repository at this point in the history
added defense against backend internal server error
  • Loading branch information
Chit132 authored Dec 17, 2023
2 parents 2fbcf85 + 745fbfd commit 9b7eeee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "abyss-overlay",
"productName": "Abyss Overlay",
"version": "2.0.2",
"version": "2.0.3",
"description": "The Official Abyss Stats Overlay",
"homepage": "https://github.com/Chit132/abyss-overlay",
"main": "main.js",
Expand Down
3 changes: 1 addition & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ <h1 class="menuitem" id="logo_title">ABYSS</h1>
<p id="changelogVersion" style="width: 100%; height: 37px; margin: 0; padding: 0; background-color: rgb(75, 75, 75); text-align: center; font-size: 20px; color: var(--primaryColor);">Changelog</p>
<p id="changelogClose">×</p>
<p style="height: calc(100% - 37px); margin: 0; margin-left: 5px; padding: 0; overflow-y: auto; color: rgb(179, 179, 179);">
- <b>Added UUID caching.</b> UUIDs are now cached to avoid making unnecessary calls to Mojang API<br><br>
- <b>Reverted hotfix for Mojang API.</b> Mojang API is fixed now!
- <b>Fixed defense against internal server error.</b> You can still use your own API key if backend server has an internal error
</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function pingBackend() {
});
data.bulletin && ModalWindow.open(data.bulletin);
}, error: (jqXHR) => {
if (jqXHR.status === 0) overlayBackendDown = true;
if (jqXHR.status === 0 || jqXHR.status === 500) overlayBackendDown = true;
else if (jqXHR.status === 403) {
overlayBackendDown = true;
setTimeout(() => {
Expand All @@ -164,7 +164,7 @@ function pingBackend() {
});
}, 1000);
}
else if (jqXHR.status === 500) hypixelAPIdown = true;
else if (jqXHR.status === 569) hypixelAPIdown = true;
updateArray();
}, complete: () => {
verifyUUID();
Expand Down

0 comments on commit 9b7eeee

Please sign in to comment.