-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patherror.go
36 lines (30 loc) · 869 Bytes
/
error.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
// Copyright 2019 Communication Service/Software Laboratory, National Chiao Tung University (free5gc.org)
//
// SPDX-License-Identifier: Apache-2.0
/*
* Nsmf_PDUSession
*
* SMF PDU Session Service
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
type GenericOpenAPIError struct {
RawBody []byte
ErrorStatus string
ErrorModel interface{}
}
// Error returns non-empty string if there was an error.
func (e GenericOpenAPIError) Error() string {
return e.ErrorStatus
}
// Body returns the raw bytes of the response
func (e GenericOpenAPIError) Body() []byte {
return e.RawBody
}
// Model returns the unpacked model of the error
func (e GenericOpenAPIError) Model() interface{} {
return e.ErrorModel
}