()
| 181 | } |
| 182 | |
| 183 | func (e ScimError) Error() string { |
| 184 | errorMessage := fmt.Sprint(e.Status) |
| 185 | if e.ScimType != "" { |
| 186 | errorMessage += fmt.Sprintf(" (%s)", e.ScimType) |
| 187 | } |
| 188 | if e.Detail != "" { |
| 189 | return fmt.Sprintf("%s - %s", errorMessage, e.Detail) |
| 190 | } |
| 191 | return fmt.Sprintf("%s - No detailed human-readable message", errorMessage) |
| 192 | } |
| 193 | |
| 194 | // MarshalJSON converts the error struct to its corresponding json representation. |
| 195 | func (e ScimError) MarshalJSON() ([]byte, error) { |
no outgoing calls