-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy patherrors.go
More file actions
20 lines (17 loc) · 949 Bytes
/
Copy patherrors.go
File metadata and controls
20 lines (17 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) Microsoft Corporation. All rights reserved.
package copilot
import "github.com/github/copilot-sdk/go/internal/jsonrpc2"
// RPCError is the SDK's JSON-RPC transport error.
// Use errors.As to retrieve it from errors wrapped by SDK operations.
// It represents remote error responses and locally synthesized errors when an
// inline response callback fails; its type alone does not establish provenance.
//
// Code and Message contain the JSON-RPC error code and message. Data contains
// the optional JSON value, which can be an object, array, or scalar. Omitted
// data is nil; explicit JSON null is the JSON text "null". Error() does not
// include Data.
//
// RPCError is an alias of the transport error, preserving its identity and
// existing wrapping behavior. Its exported fields are part of the public API.
// The fields and Data bytes are shared with the error chain; copy before mutation.
type RPCError = jsonrpc2.Error