mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 03:51:29 +00:00
0266609bf6
* adding in custom header * adding in parsing for middleware * fixing casing * add handling on error as well * changing how error is handled for header * changing how error is handled * fixing casing * Update beacon-chain/rpc/eth/beacon/blocks.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/blinded_blocks.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/blinded_blocks.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * Update beacon-chain/rpc/eth/beacon/blocks.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * fixing unit tests and review comment * making some constants consistent in 1 file * fixing missed blinded blocks * fixing constants in custom handler tests --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
17 lines
601 B
Go
17 lines
601 B
Go
package grpc
|
|
|
|
// CustomErrorMetadataKey is the name of the metadata key storing additional error information.
|
|
// Metadata value is expected to be a byte-encoded JSON object.
|
|
const CustomErrorMetadataKey = "Custom-Error"
|
|
|
|
// HttpCodeMetadataKey is the key to use when setting custom HTTP status codes in gRPC metadata.
|
|
const HttpCodeMetadataKey = "X-Http-Code"
|
|
|
|
// MetadataPrefix is the prefix for grpc headers on metadata
|
|
const MetadataPrefix = "Grpc-Metadata"
|
|
|
|
// WithPrefix creates a new string with grpc metadata prefix
|
|
func WithPrefix(value string) string {
|
|
return MetadataPrefix + "-" + value
|
|
}
|