Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors : updated version #268

Closed
wants to merge 2 commits into from
Closed

Errors : updated version #268

wants to merge 2 commits into from

Conversation

tchak
Copy link
Member

@tchak tchak commented May 28, 2012

In this version, we handle validation errors and server errors.
Some ground work is done in order to prepare client side validation support.

For the error handeling part tests are much more complete.

Adapter part is a work in progress (need tests)

@tchak tchak mentioned this pull request May 28, 2012
tchak added 2 commits June 6, 2012 10:18
* errors are managed by dedicated `errors` object
* adding / removing errors from this object change record state
* bump revision

fix rollback from invalid state

add error state handling

add validate method to record

more tests
@pjlammertyn
Copy link

love to see this in ember data

@josepjaume
Copy link

Wow, I hadn't completely understood your implementation until I tried to achieve something like that myself. It's great, I also found out that transactions don't try to re-commit records when they're invalid.

I really hope this gets merged into ember-data, it's a must-have.

@wagenet
Copy link
Member

wagenet commented Jun 21, 2012

@tchak What's the status of this? I see it doesn't merge cleanly.

@tchak
Copy link
Member Author

tchak commented Jun 21, 2012

I talked with @tomdale about it and he did not like it to much I think...
I can rework this but I would like a proper review in order to know what exactly should I change.

One thing that was proposed is to make errors object use Enumerable interface. I will look in to it.
Another question is, should we handle server validation errors, client validation errors and plain server errors on the same interface?

@nedcampion
Copy link

Realize there's probably more pressing 1.0 Beta work to be done, but I'm real curious about the discussion here. I was just trying out using your errors implementation @tchak with modifications to implement Enumerable . Would love to be of help here however possible.

@tchak
Copy link
Member Author

tchak commented Aug 12, 2012

Closing in favor of #360

@tchak tchak closed this Aug 12, 2012
@runspired runspired added 🏷️ feat This PR introduces a new feature and removed Improvement labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ feat This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants