Hello ! I'm working with a weird API that has two...
# ktor
d
Hello ! I'm working with a weird API that has two possible responses. Globally, I receive a 200 code but the response body can change:
Copy code
{
 ...
 "data": { // error case
  "errors": [ .. ]
 }
 ...
}
or
Copy code
{
 ...
 "data": { // real object here
  "key1": "..",
  "key2": ".."
 }
 ...
}
So to simplify the error management, I would like to use Response validator but if I read the body in the validationResponse, I can't read it where the call is processed. Have you a solution about that ?
e
a
d
Thanks for your help !