Beispiel #1
0
// Inflate expands a problem with contextal information.
// At present it adds the request's id as the problem's Instance, if available.
func Inflate(ctx context.Context, p *P) {
	//TODO: add requesting url to extra info

	//TODO: make this prefix configurable
	p.Type = "https://stellar.org/horizon-errors/" + p.Type

	p.Instance = requestid.FromContext(ctx)
}
Beispiel #2
0
// Inflate expands a problem with contextal information.
// At present it adds the request's id as the problem's Instance, if available.
func Inflate(ctx context.Context, p *P) {
	//TODO: inflate type into full url
	//TODO: add requesting url to extra info

	p.Instance = requestid.FromContext(ctx)
}