-
Notifications
You must be signed in to change notification settings - Fork 26
/
errors.go
52 lines (45 loc) · 1.33 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Go SDK for OpenFGA
*
* API version: 1.x
* Website: https://openfga.dev
* Documentation: https://openfga.dev/docs
* Support: https://openfga.dev/community
* License: [Apache-2.0](https://github.com/openfga/go-sdk/blob/main/LICENSE)
*
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
*/
package client
// FgaRequiredParamError Provides access to the body, error and model on returned errors.
type FgaRequiredParamError struct {
error string
param string
}
// Error returns non-empty string if there was an error.
func (e FgaRequiredParamError) Error() string {
if e.error == "" {
return "Required parameter " + e.Param() + " was not provided"
}
return e.error
}
// Param returns the name of the missing parameter
func (e FgaRequiredParamError) Param() string {
return e.param
}
// FgaInvalidError Provides access to the body, error and model on returned errors.
type FgaInvalidError struct {
error string
param string
description string
}
// Error returns non-empty string if there was an error.
func (e FgaInvalidError) Error() string {
if e.error == "" {
return "Parameter " + e.Param() + " is not a valid " + e.description
}
return e.error
}
// Param returns the name of the invalid parameter
func (e FgaInvalidError) Param() string {
return e.param
}