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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friendly Errors #101

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
8 participants
@nikz
Contributor

nikz commented Oct 23, 2015

Hopefully I filled out everything correctly.

Thanks for looking at this! 馃槑

Here's a wee "friendly error" preview:

@nikz nikz changed the title from First cut of Friendly Errors RFC to Friendly Errors Oct 23, 2015

@alexspeller

This comment has been minimized.

Show comment
Hide comment
@alexspeller

alexspeller Oct 23, 2015

Contributor

馃憤

Contributor

alexspeller commented Oct 23, 2015

馃憤

@mmun mmun added the T-ember-data label Oct 23, 2015

@tim-evans

This comment has been minimized.

Show comment
Hide comment
@tim-evans

tim-evans Oct 28, 2015

It would be neat to provide something like Rail's filter_parameters if requests are shown.

tim-evans commented Oct 28, 2015

It would be neat to provide something like Rail's filter_parameters if requests are shown.

@jcope2013

This comment has been minimized.

Show comment
Hide comment
@jcope2013

jcope2013 commented Oct 28, 2015

@bmac

This comment has been minimized.

Show comment
Hide comment
@bmac

bmac Nov 4, 2015

Member

Hi @nikz. I like this rfc a lot. Would you like to open a pr on the Ember Data repo where we can iterate on the implementation of the friendly-error-adapter code?

Member

bmac commented Nov 4, 2015

Hi @nikz. I like this rfc a lot. Would you like to open a pr on the Ember Data repo where we can iterate on the implementation of the friendly-error-adapter code?

export default ActiveModelAdapter.extend({
ajax(url, method) {
this.lastRequest = {

This comment has been minimized.

@bmac

bmac Nov 4, 2015

Member

This technique may not work with multiple concurrent ajax requests. Instead I suspect we will need to pass the request or errorMessage as an argument to handleResponse.

@bmac

bmac Nov 4, 2015

Member

This technique may not work with multiple concurrent ajax requests. Instead I suspect we will need to pass the request or errorMessage as an argument to handleResponse.

This comment has been minimized.

@nikz

nikz Nov 5, 2015

Contributor

Yeah, mostly a hack to avoid trying to drop too deeply into the ember-data code. Definitely better ways to do it!

@nikz

nikz Nov 5, 2015

Contributor

Yeah, mostly a hack to avoid trying to drop too deeply into the ember-data code. Definitely better ways to do it!

@nikz

This comment has been minimized.

Show comment
Hide comment
@nikz

nikz Nov 5, 2015

Contributor

@bmac awesome! I will do so over the weekend and cc you :)

Contributor

nikz commented Nov 5, 2015

@bmac awesome! I will do so over the weekend and cc you :)

@nikz nikz referenced this pull request Nov 13, 2015

Merged

Friendly Errors #3930

@fivetanley

This comment has been minimized.

Show comment
Hide comment
@fivetanley

fivetanley Jan 6, 2016

Member

Assigned an RFC number and merged in 6157685

@nikz's PR in emberjs/data#3930 was the implementation. Thank you so much!

Member

fivetanley commented Jan 6, 2016

Assigned an RFC number and merged in 6157685

@nikz's PR in emberjs/data#3930 was the implementation. Thank you so much!

@fivetanley fivetanley closed this Jan 6, 2016

@grapho

This comment has been minimized.

Show comment
Hide comment
@grapho

grapho Jan 6, 2016

I really like the idea of this RFC. However I also hold out hope that an AdapterError could hold an actual data payload.. for those of us that might receive an array of errors or a hash of error parameters? rather than (read: in addition too) just a serialized string of info?

grapho commented Jan 6, 2016

I really like the idea of this RFC. However I also hold out hope that an AdapterError could hold an actual data payload.. for those of us that might receive an array of errors or a hash of error parameters? rather than (read: in addition too) just a serialized string of info?

@nikz

This comment has been minimized.

Show comment
Hide comment
@nikz

nikz Jan 6, 2016

Contributor

@grapho Hiya! Remember this is just the default handler if you haven't specified anything else, mostly for debugging and error tracking.

If you use a blob of JSON then that'll be spit out, or if you're looking for more model validation things then a JSON API "errors" payload would work best.

Contributor

nikz commented Jan 6, 2016

@grapho Hiya! Remember this is just the default handler if you haven't specified anything else, mostly for debugging and error tracking.

If you use a blob of JSON then that'll be spit out, or if you're looking for more model validation things then a JSON API "errors" payload would work best.

@grapho

This comment has been minimized.

Show comment
Hide comment
@grapho

grapho Jan 6, 2016

@nikz yeah oops, i momentarily forgot that error payload can already get passed in... just ignore me ;)

grapho commented Jan 6, 2016

@nikz yeah oops, i momentarily forgot that error payload can already get passed in... just ignore me ;)

twokul pushed a commit to twokul/rfcs that referenced this pull request Jan 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment