Skip to content

Commit

Permalink
Display error message on the Client's UI
Browse files Browse the repository at this point in the history
  • Loading branch information
KBandipo committed Nov 10, 2024
1 parent f2e35da commit ca9b7ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions @dev-client/views/@plugin_githubsync/githubsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ submitIssueForm.addEventListener('submit', async (e) => {
},
body: JSON.stringify({ title, body }),
});

if (response.status === 401){
displayToastrMessage.innerHTML = 'Unauthorized: Can\'t access this resource';
return;
}

const data = await response.json();
console.log(data);
issueTitleInput.value = '';
Expand Down

0 comments on commit ca9b7ff

Please sign in to comment.