mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
display server provided error messages
This commit is contained in:
parent
bb2c2eb870
commit
99cca89522
1 changed files with 1 additions and 5 deletions
|
@ -87,11 +87,7 @@ module.exports = {
|
|||
pages
|
||||
});
|
||||
}catch(e){
|
||||
if(e.response?.body?.status){
|
||||
if(e.response.body.status == 2){
|
||||
return editOrReply(context, {embeds:[createEmbed("error", context, `Unable to perform lyrics search.`)]})
|
||||
}
|
||||
}
|
||||
if(e.response?.body?.status && e.response.body.status == 2 && e.response.body.message) return editOrReply(context, {embeds:[createEmbed("error", context, e.response.body.message)]})
|
||||
console.log(JSON.stringify(e.raw))
|
||||
return editOrReply(context, {embeds:[createEmbed("error", context, `Something went wrong.`)]})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue