I’m facing issues formatting reponses in krakenD.
- {
“@comment”: “Verify OTP and Sign Access Token and Refresh Token”,
“endpoint”: “/auth/login-with-mobile/verify”,
“method”: “POST”,
“backend”: [
{
“encoding”: “no-op”,
“url_pattern”: “/v1/auth/login-with-mobile/verify”
}
],
“extra_config”: {
“auth/signer”: {
“alg”: “HS256”,
“kid”: “sim2”,
“keys_to_sign”: [“access_token”, “refresh_token”],
“jwk_url”: “http://mobipay-backend-service:4000/symmetric.json”,
“disable_jwk_security”: true
}
}
},
This is the configuration I’m using in krakenD to connect my nestjs backend.
Nestjs backend return this response for validation error.
{
“message”: [
“phone must be a valid phone number”,
“otp should not be empty”
],
“error”: “Bad Request”,
“statusCode”: 400
}
But for this response krakenD shows Could not get response
Error: aborted in postman.
- if i use “auth/validator”: {
“alg”: “HS256”,
“roles_key”: “roles”,
“roles”: [],
“jwk_url”: “http://mobipay-backend-service:4000/symmetric.json”,
“disable_jwk_security”: true
}
config krakenD just return just a status code with empty body. How i can modify those response body?