Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

chichilatte

Members
  • Posts

    1
  • Joined

  • Last visited

chichilatte's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hmm, this seems like a deal breaker. It's pretty vital that we can get data about a server error, beyond a generic "Stream Error" and an HTTP status. For example, creating a new player in a game, how would our flash tell the difference between two different server errors "username in use" and "username must be alphanumeric"? The server response would commonly be HTTP status 400, with JSON content something like: { "type": "usernameInUse", "message": "Sorry, username is already taken." } I can't seem to find any way to get that kind of data into my LoaderMax onError handler. Perhaps the workaround is to avoid HTTP error statuses altogether – the server sends a success status (200) and JSON error object, and in the LoaderMax onComplete handler we check for that error object in event.target.content. Bit hacky/non-standard/non-resty, but it works. PS Love greensock, many thanks!
×