Errors sent from the server look like { code: string, message: string }. Currently when an error is received, the message is toasted to the player. We should instead use the code to look up a localization, and include in the error message any parameters required to fill in the blanks of that localized error message. The existing data property of the response could be used for this purpose ({ error: { code: string, message: string }, data: { ... } })
Errors sent from the server look like
{ code: string, message: string }
. Currently when an error is received, the message is toasted to the player. We should instead use thecode
to look up a localization, and include in the error message any parameters required to fill in the blanks of that localized error message. The existingdata
property of the response could be used for this purpose ({ error: { code: string, message: string }, data: { ... } }
)