Fix Typo & Type Error in LavalinkException#352
Conversation
It's the HTTP Status Code? I thought it returned a reason description of the error. I'm not 100% sure if it can be |
It's the HTTP status code message. There is a message attribute, which looks to be missing, that would contain the true error message. I recommend checking the Lavalink docs. Otherwise simply correcting the attribute in the docs is fine for now, since we will be releasing v4 soon. |
|
Right, doesn't seem like it can be In that case I'll just fix the annotations? Or do you also want me to add the |
|
Now that I take a look at it again, the |
Description
This PR fixes a typo in the docs of
wavelink.exception.LavalinkExceptionclass, where it mentions the attributereasonto hold the reason of the exception but it's theerrorattribute that holds the reason.I've decided to only change to documentation name to match the attribute name instead of matching the attribute name to the mentioned name in the doc, to prevent any backward incompatibility.
The only thing I'm not fully sure of is the additional type annotation "fix" I made, the docs mention that the
reason(errorattr) can beNonebut theErrorResponsetyped dict & theerrorattribute in theLavalinkExceptionclass don't annotate it asNone | str. So either I'm correct about the fix or the documentation is wrong aboutreason(error) beingNone | str.Checklist
P.S. There doesn't seem to be a changelog file in this repo... unless I'm terribly blind.