File: err.go

package info (click to toggle)
golang-golang-x-oauth2 0.15.0-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 748 kB
  • sloc: makefile: 15
file content (18 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package externalaccount

import "fmt"

// Error for handling OAuth related error responses as stated in rfc6749#5.2.
type Error struct {
	Code        string
	URI         string
	Description string
}

func (err *Error) Error() string {
	return fmt.Sprintf("got error code %s from %s: %s", err.Code, err.URI, err.Description)
}