diff --git a/backends/ignite.go b/backends/ignite.go index f1ef1bc2..7c13dde3 100644 --- a/backends/ignite.go +++ b/backends/ignite.go @@ -190,7 +190,7 @@ func (ig *IgniteBackend) Get(ctx context.Context, key string) (string, error) { igniteResponse := getResponse{} if unmarshalErr := json.Unmarshal(responseBytes, &igniteResponse); unmarshalErr != nil { - return "", fmt.Errorf("Unmarshal response error: %s; Response body: %s", unmarshalErr.Error(), string(responseBytes)) + return "", utils.NewPBCError(utils.GET_INTERNAL_SERVER, fmt.Sprintf("Ignite response unmarshal error: %s; Response body: %s", unmarshalErr.Error(), string(responseBytes))) } // Validate response diff --git a/backends/ignite_test.go b/backends/ignite_test.go index acff43eb..2c8f2f64 100644 --- a/backends/ignite_test.go +++ b/backends/ignite_test.go @@ -441,7 +441,7 @@ func TestIgniteGet(t *testing.T) { igniteError: nil, }, expected: testOutput{ - err: errors.New("Unmarshal response error: invalid character 'm' looking for beginning of value; Response body: malformed"), + err: utils.NewPBCError(utils.GET_INTERNAL_SERVER, "Ignite response unmarshal error: invalid character 'm' looking for beginning of value; Response body: malformed"), }, }, { diff --git a/config.yaml b/config.yaml index a62bd086..accba35f 100644 --- a/config.yaml +++ b/config.yaml @@ -11,7 +11,7 @@ request_limits: max_num_values: 10 max_ttl_seconds: 3600 backend: - type: "memory" # Switch to be "aerospike", "cassandra", "memcache" or "redis" for production. + type: "memory" # Switch to be "aerospike", "cassandra", "memcache", "ignite" or "redis" for production. aerospike: hosts: [ "aerospike.prebid.com" ] port: 3000