Skip to content

Commit

Permalink
Remove the Error's unused code field
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Apr 14, 2023
1 parent 796a8dd commit 444ef75
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions webcrypto/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ const (
// Error represents a custom error emitted by the
// Web Crypto API.
type Error struct {
// Code is one of the legacy error code constants, or 0 if none match.
Code int `json:"code"`

// Name contains one of the strings associated with an error name.
Name string `json:"name"`

Expand All @@ -60,9 +57,8 @@ func (e *Error) Error() string {
}

// NewError returns a new WebCryptoError with the given name and message.
func NewError(code int, name, message string) *Error {
func NewError(name, message string) *Error {
return &Error{
Code: code,
Name: name,
Message: message,
}
Expand Down

0 comments on commit 444ef75

Please sign in to comment.