Update primary error functions to take a context, deprecate old functions (#1358)
* add new error funcs which take a ctx and deprecate existing funcs * use context where available when writing error events * remove circular internal/errors pkg dep * suppress some chatty errors using errors.WithoutEvent() * convert auth oidc funcs to take context where needed to write events Co-authored-by: Jim <jlambert@hashicorp.com>
This commit is contained in:
1 parent
02ff2db66e
commit
6b78108ecf
227 files changed
+3945
-3736
No files matched your search
@@ -23,7 +23,7 @@ func newId() (string, error) {
|
||||
const op = "session.newId"
|
||||
id, err := db.NewPublicId(SessionPrefix)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, op)
|
||||
return "", errors.WrapDeprecated(err, op)
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func newStateId() (string, error) {
|
||||
const op = "session.newStateId"
|
||||
id, err := db.NewPublicId(StatePrefix)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, op)
|
||||
return "", errors.WrapDeprecated(err, op)
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
@@ -41,7 +41,7 @@ func newConnectionId() (string, error) {
|
||||
const op = "session.newConnectionId"
|
||||
id, err := db.NewPublicId(ConnectionPrefix)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, op)
|
||||
return "", errors.WrapDeprecated(err, op)
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
@@ -50,7 +50,7 @@ func newConnectionStateId() (string, error) {
|
||||
const op = "session.newConnectionStateId"
|
||||
id, err := db.NewPublicId(ConnectionStatePrefix)
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, op)
|
||||
return "", errors.WrapDeprecated(err, op)
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
Reference in new issue
Block a user