Comments (2)
Thanks for the report! I'm partial to the second option - moving away from Jason.decode!/2
and using the non-banged version. I'm not sure what the flow for this would look like though. If we encounter this error, what do we do about it?
from nostrum.
Yeah, I'm not sure. It's probably entirely reasonable to still just raise an exception and die, just with a more helpful message (like Got a "502 Bad Gateway" response with a non-JSON payload
) to make it clear what's happening.
Having the Ratelimiter
die will also mean that anyone who is currently issuing an API call will also raise an exception (and probably die, and hopefully be resurrected by their supervisor tree). That also seems good to me — I imagine you don't really want an API outage to be reported as an {:error, %Nostrum.Error.ApiError{...}}
tuple, because that's for actual API errors, with defined behaviour. We're very much in the realm of undefined behaviour here, which is what exceptions are for, I think.
from nostrum.
Related Issues (20)
- message.content coming in empty HOT 2
- Wrong type for `interaction.data.options` HOT 2
- Support the webhook allowed_mentions object HOT 1
- Re-integrate dialyzer into development HOT 1
- Feat: pass shard list to gateway HOT 7
- Guild Cache crashes
- Ratelimiter leaks processes HOT 3
- Publishing docs fails on master
- Missing function in Api.Ratelimiter HOT 2
- Ratelimiter crash with new store API
- Nostrum Application Crash Loop HOT 5
- Add support for application-commands#permissions feature HOT 2
- Ratelimiter state machine errors HOT 10
- Is there TextInput Modal works? Any example? HOT 2
- Inquiry about missing options in Nostrum.ApplicationCommand
- Request: disable Nostrum startup HOT 1
- ** (MatchError) no match of right hand side value: {:ok, :http} HOT 9
- Connection Websocket upgrade failed HOT 1
- msg.content is blank HOT 4
- Channel cache is not populated in recent GitHub versions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nostrum.