apiserver: refactor part 1 #3296

Merged
merged 1 commit into from Sep 17, 2015

Conversation

Projects
None yet
2 participants
Owner

rogpeppe commented Sep 16, 2015

No semantic changes as yet.

We standardise on a single sendError method, losing sendExistingError.
We consolidate the four slightly different versions of sendJSON
into a single implementation in httpContext.
We move some code so that type definitions are closer to their methods.

Unfortunately we cannot standardise on a single implementation of
sendError because there are at least four different and incompatible
ways of returning an error from an HTTP request, but we will
attempt to improve things in the next installment.

(Review request: http://reviews.vapour.ws/r/2678/)

Owner

rogpeppe commented Sep 17, 2015

$$merge$$

Contributor

jujubot commented Sep 17, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Sep 17, 2015

Merge pull request #3296 from rogpeppe/044-cubs-apiserver-refactor-1
apiserver: refactor part 1

No semantic changes as yet.

We standardise on a single sendError method, losing sendExistingError.
We consolidate the four slightly different versions of sendJSON
into a single implementation in httpContext.
We move some code so that type definitions are closer to their methods.

Unfortunately we cannot standardise on a single implementation of
sendError because there are at least four different and incompatible
ways of returning an error from an HTTP request, but we will
attempt to improve things in the next installment.


(Review request: http://reviews.vapour.ws/r/2678/)

@jujubot jujubot merged commit 2ec7756 into juju:chicago-cubs Sep 17, 2015

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