azure-sdk-for-go/sdk/azcore/errors.go

18 строки
585 B
Go
Исходник Обычный вид История

Feature/generics (#17381) * Update CI to use Go 1.18beta.2 (#16963) * Update CI to use Go 1.18beta.2 * add prerelease install template revert some unneeded changes * fix parameters references * fix curl * use archive names * fix param * update linter * build linters from source, display Go version * lint clean * fix smoke test version detection * Update build constraints to Go 1.18 (#16966) Specify 1.18 in go.mod file. * Disable linter for now (#16975) * Disable linter for now Blows up on generic type parameters so disabling until it's working. Restored installation to its original form. * skip on linter install failure * Convert to package, JSON null funcs to generics (#16973) NullValue now takes a generic type parameter instead of an interface arg to determine the type of null sentinel value to create. IsNullValue infers its generic parameter to determine the type of null sentinel value to look for. At present, there is no way to express a 'nillable' generic type constraint so the funcs simply take a [T any] which should be fine as they typically take/return pointer-to-types. The 'to' package has been reduced to two funcs. * Disable publishing test results for now (#16979) * Disable publishing test results for now It's broken due to lack of generics support. Test failures will still block CI though. * revert fake failure * exclude track 2 from track 1 Format Check CI step * refine track 1 gofmt check * Migrate expiring resource to generics (#16974) * Add generic pager implementation (#17027) * Add generic pager implementation * refine first page flag and processor vars * refine per feedback, start adding tests * fix LRO case, add remaining tests * more consolidation * update changelog * remove page param, use unmarshal instead * Add generic poller implementation (#17297) Due to lack of support for type aliasing a generic type, we have duplicate definitions for ARM and data-plane. We can consolidate the definitions when type aliasing support is added in the future. * Clean-up in prep for merging feature/generics to main (#17380) * Clean-up in prep for merging feature/generics to main Removed some temporary CI changes after rebasing on main. Added missing entries to the changelog. Bumped version to v0.23.0 for breaking changes. * bump golangci-lint to latest version * switch to temporary fork of gocov
2022-03-29 03:19:34 +03:00
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package azcore
import "github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/exported"
// ResponseError is returned when a request is made to a service and
// the service returns a non-success HTTP status code.
// Use errors.As() to access this type in the error chain.
//
// When marshaling instances, the RawResponse field will be omitted.
// However, the contents returned by Error() will be preserved.
type ResponseError = exported.ResponseError