Skip to content

Server Errors!

Compare
Choose a tag to compare
@jackiekircher jackiekircher released this 04 Sep 20:35
ff579bf

Adds server errors directly to their corresponding attributes in models.

Previously we had made the decision to lump all server errors onto a "server" attribute so that they would at least be accessible. Now, when errors come back from the API we parse the source pointer for each error to determine which attribute the error is for and add it in the same manner as our model validations. This is a breaking change, so 3.0 has arrived!

This also support errors for create/update requests using the JSONApi bulk extension. When these errors are returned, the pointer will contain an index that corresponds to the payload of the original request which is used to determine which object in the store the errors should be assigned to.