Commit Graph

15 Commits (eb1ea269954da2ce557f3305fa88d42e3ade7975)

Author SHA1 Message Date
Clayton Coleman d167c11b59 Remove layers of indirection between apiinstaller and resthandler
Make the RESTHandler feel more go-restful, set the stage for adding
new types of subresource collections.
2015-02-11 16:26:06 -05:00
Clayton Coleman 19987612bf Replace code that eats errors with a more consistent reporting
In order to allow certain programmer error / unexpected error states
to be captured, replace sections that log and eat errors with a method
that can be centrally replaced.  This captures two common error sources,
replication errors, and apiserver code that returns invalid errors.
2015-01-26 20:54:29 -05:00
Eric Tune 26a2bab797 Add forbidden error.
Will be used in subsequent PRs that add authorization.
2014-10-16 09:25:54 -07:00
Clayton Coleman 74db9a1b20 Log apiserver errors that are not of an expected type
Currently HttpLog only expected status range - this logs errors
that come back from a REST storage object without being first
converted to something in pkg/api/errors.  This usually indicates
unexpected error conditions that a programmer didn't explicitly
check for - the kinds of problems that may need debugging by
an operator later.  Set to V(1) because they don't impair normal
operation.
2014-09-25 16:21:48 -04:00
Clayton Coleman 34c40e4e48 Errors should be part of api/errors, not apiserver
Renames constructor methods to be errors.New<name> which changed a few
places.
2014-09-03 17:16:00 -04:00
Vojtech Vitek (V-Teq) 59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Clayton Coleman 0a841a49fd Naming of Reason constants is inconsistent
Changed ReasonType to StatusReason (to match the field) and
changed CauseReason to CauseType and renamed StatusCause.Reason to
Type.
2014-08-26 13:39:21 -04:00
Clayton Coleman 52923a1348 Return validation errors from storage create/update 2014-08-26 13:30:55 -04:00
Clayton Coleman d326ba2976 Add a Causes array to status details for validation errors
Uses the same constant values as api/errors for each nested
reason.
2014-08-26 13:30:55 -04:00
Clayton Coleman 0083fae453 Provide helpers and tests for common error types
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually.  Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.
2014-08-08 19:44:47 -04:00
Clayton Coleman 836d2b9808 Fix proxy error condition and simplify method
Add new minion proxy test case.
2014-08-06 01:03:17 -04:00
Clayton Coleman 325f9ef005 Make create atomic on etcd for Services/ReplControllers 2014-08-05 01:12:27 -04:00
Clayton Coleman fe7f611d88 Split operations code and add comments 2014-07-30 17:15:09 -04:00
Clayton Coleman a2c86e4c97 Simplify helpers 2014-07-30 17:15:09 -04:00
Clayton Coleman d5e22bfe2a Split index 2014-07-30 17:14:07 -04:00