-
Notifications
You must be signed in to change notification settings - Fork 183
Description
What is the issue with the Web IDL Standard?
In webmachinelearning/writing-assistance-apis#31 I proposed adding a TooManyTokens DOMException-derived interface which gives information on how far over the token limit you are. It had properties tokenCount and tokensAvailable, such that ex.tokenCount > ex.tokenAvailable is the error condition being signaled.
@michaelwasserman pointed out that this would probably be worth generalizing beyond "tokens", for the entire web ecosystem to use. I tend to agree. I'm just unsure what the general names should be.
My current best proposal is: QuotaExceededDetailedError, with properties quota and request. This plays off of the existing, non-detailed "QuotaExceededError" DOMException.
(But, maybe "quota" feels too storage-specific? Check out "QuotaExceededError" DOMException's existing usages on the web to see what you think.)
Other options:
LimitExceededError,LimitError,OverageErrorrequested(instead ofrequest),limit,max,availableamount,value,attempted
Does the community have any thoughts on what would be the best names, which are suitable for the web API ecosystem as a whole?