pkg / errors

Simple error handling primitives
https://godoc.org/github.com/pkg/errors
BSD 2-Clause "Simplified" License
8.18k stars 691 forks source link

[KH-13246] More Errors #235

Closed coldfgirl closed 3 years ago

coldfgirl commented 3 years ago

Adding more errors to have better granularity. The structure and thought behind these additions is as follows:

Data State Errors

AlreadyExists [NEW]

The resource trying to be created already exists.

ConflictingChanges [NEW]

Changes to a resource cannot be performed due to conflicts with other existing resources.

NotFound

Resource is not found.

Parameter Errors

BadFormat [NEW]

Data provided is of the correct type but is in a format that could not be understood.

InvalidArgument

Data provided was invalid.

MissingAgrument [NEW]

Data was expected but is missing.

UnsupportedType

Data has been provded in an unsupported type.

Uninitialzied [NEW]

A dependency hasn’t been initialized but is required.

General System Errors

IO [NEW]

An I/O operation failed.

DataLoad

Data could not be loaded.

Network [NEW]

Network operation failed.

Permission Errors

AccessDenied [NEW]

Current context does not have permission to access this action.

Disabled [NEW]

The action is disabled (feature flagging, etc) in a way that’s not necessarily specific to this context.

Limited [NEW]

The action has been temporarily limited (rate limiting, etc) in a way that is not based off of the application state.

coldfgirl commented 3 years ago

Oops, wrong fork sorry!

puellanivis commented 3 years ago

I was wondering why a JIRA ticket was attached. :laughing: