You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would appreciate more helpful error messages if possible.
Example & End result
For example, entering =TBATeamEventMatchKeys("1836","2018cabl") returns a #REF error with the explanation Reference does not exist. The reason why it does not yet exist is because frc1836 does not have any matches for 2018cabl yet. An error like Team 1836 does not have any matches at Beach Blitz 2018 would be a lot more informative.
Further enhancement
To go a step further, it would be nice if the sheet could check against the API to see if that error will ever be resolved. By this I mean: using the last example, 1836 is competing at 2018cabl but there are not yet any matches for the event. However, if I entered =TBATeamEventMatchKeys("1836","2018cc"), I would currently get the same #REF error (or I would get Team 1836 does not have any matches at Chezy Champs 2018 under my suggested model). However, 1836 is not competing at 2018cc so there will never be any matches listed.
Proposed solution
Custom error messages
Custom errors are supported in Google Script and can be implemented per these guidelines.
In practice
In actuality, it is tricky to know when to serve the error, simply because the TBA API will just return null when there is no information to be relayed. Going back to the same example, both .../team/frc1836/event/2018cabl/status and .../team/frc1836/event/2018cc/status will return null which is just not that helpful. So, some additional logic would need to be worked out.
The text was updated successfully, but these errors were encountered:
Agreed, better error messages will be something of a longer-term project due to the wide variety of things that can go wrong (key, event is n/a, team is n/a, team is not at event, etc.) This will be important to implement soon enough though.
Summary
I would appreciate more helpful error messages if possible.
Example & End result
For example, entering
=TBATeamEventMatchKeys("1836","2018cabl")
returns a#REF
error with the explanationReference does not exist.
The reason why it does not yet exist is because frc1836 does not have any matches for 2018cabl yet. An error likeTeam 1836 does not have any matches at Beach Blitz 2018
would be a lot more informative.Further enhancement
To go a step further, it would be nice if the sheet could check against the API to see if that error will ever be resolved. By this I mean: using the last example, 1836 is competing at 2018cabl but there are not yet any matches for the event. However, if I entered
=TBATeamEventMatchKeys("1836","2018cc")
, I would currently get the same#REF
error (or I would getTeam 1836 does not have any matches at Chezy Champs 2018
under my suggested model). However, 1836 is not competing at 2018cc so there will never be any matches listed.Proposed solution
Custom error messages
Custom errors are supported in Google Script and can be implemented per these guidelines.
In practice
In actuality, it is tricky to know when to serve the error, simply because the TBA API will just return
null
when there is no information to be relayed. Going back to the same example, both .../team/frc1836/event/2018cabl/status and .../team/frc1836/event/2018cc/status will returnnull
which is just not that helpful. So, some additional logic would need to be worked out.The text was updated successfully, but these errors were encountered: