Let WP_Error implement WP_JSON_ResponseInterface #39

Closed
rmccue opened this Issue Dec 2, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@rmccue
Member

rmccue commented Dec 2, 2013

As discussed, we might want to always return a ResponseInterface rather than allowing WP_Error be a special case here.

Let's consider after #33 is merged.

@rmccue rmccue modified the milestones: Core Integration, 1.0 Apr 20, 2014

@rachelbaker

This comment has been minimized.

Show comment
Hide comment
@rachelbaker

rachelbaker May 1, 2014

Member

@rmccue is there anything still to address here now that #154 was merged?

Member

rachelbaker commented May 1, 2014

@rmccue is there anything still to address here now that #154 was merged?

@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue May 3, 2014

Member

@rmccue is there anything still to address here now that #154 was merged?

When we start on core integration, I'd like to consider this possibility then. Not something we can do before then really though. :)

Member

rmccue commented May 3, 2014

@rmccue is there anything still to address here now that #154 was merged?

When we start on core integration, I'd like to consider this possibility then. Not something we can do before then really though. :)

@rachelbaker rachelbaker modified the milestone: Core Integration May 3, 2014

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber May 2, 2015

Member

@rmccue I don't think this is still applicable?

Member

danielbachhuber commented May 2, 2015

@rmccue I don't think this is still applicable?

@rmccue

This comment has been minimized.

Show comment
Hide comment
@rmccue

rmccue May 3, 2015

Member

I think our is_error and as_error methods on the response object handle this pretty well now. Someday down the line, it'd be nice for is_wp_error to recognise ( $e instanceof WP_REST_Response ) && $e->is_error, but no need to keep this in the meantime I think.

Member

rmccue commented May 3, 2015

I think our is_error and as_error methods on the response object handle this pretty well now. Someday down the line, it'd be nice for is_wp_error to recognise ( $e instanceof WP_REST_Response ) && $e->is_error, but no need to keep this in the meantime I think.

@rmccue rmccue closed this May 3, 2015

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber May 3, 2015

Member

I agree.

Member

danielbachhuber commented May 3, 2015

I agree.

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