scimerror

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package scimerror defines SCIM protocol errors as specified in RFC 7644 section 3.12.

Index

Constants

View Source
const ErrNotFound errors.String = "not found"

internal special error

Variables

View Source
var NoErrorReturning201 = nvelope.ReturnCode(errors.String(""), 201)

fake error to write status code

Functions

func NewBadRequestSCIMErr

func NewBadRequestSCIMErr(t SCIMErrorType, e error) error

NewBadRequestSCIMErr returns SCIMErr with SCIMErrorType and fixed bad request status code https://datatracker.ietf.org/doc/html/rfc7644#section-3.12

func NewSCIMErr

func NewSCIMErr(status int, e error) error

func NewSCIMErrWithType added in v0.0.2

func NewSCIMErrWithType(status int, t SCIMErrorType, e error) error

NewSCIMErrWithType returns a SCIM error with both HTTP status and scimType (for example uniqueness -> 409 Conflict).

Types

type SCIMError

type SCIMError struct {
	Detail error `json:"detail"`
	Status int   `json:"status"`
	// contains filtered or unexported fields
}

func (*SCIMError) Error

func (se *SCIMError) Error() string

func (*SCIMError) Is

func (se *SCIMError) Is(target error) bool

func (SCIMError) MarshalSCIM

func (se SCIMError) MarshalSCIM([]string, bool) ([]byte, error)

type SCIMErrorType

type SCIMErrorType string

all SCIMErrorType is 404

const (
	InvalidFilter   SCIMErrorType = "invalidFilter"
	TooMany         SCIMErrorType = "tooMany"
	UniquenessError SCIMErrorType = "uniqueness"
	MutabilityError SCIMErrorType = "mutability"
	InvalidSyntax   SCIMErrorType = "invalidSyntax"
	InvalidPath     SCIMErrorType = "invalidPath"
	NoTarget        SCIMErrorType = "noTarget"
	InvalidValue    SCIMErrorType = "invalidValue"
	InvalidVers     SCIMErrorType = "invalidVers"
	Sensitive       SCIMErrorType = "sensitive"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL