I am working on a service 'A' that allows customers to call third party services. Lets call it service 'B'
Customer -> 'A' -> service 'B'
A provides invokeAPI capability to customer to invoke api on service B via A.Now, I am torn - what should be the http status code returned by A to customer.
B return 200 -> A returns 200B return 202 -> A returns 200 or 202 ?Data validation error in A -> return 400 ?B return 4xx -> A return 200 with 4xx inside response body, or 4xx(mimic service B response code)
Similarly, we will be generating SDK for service A. Its a java service. Should we throw exception from A, or just return 200 with body containing error list. Customer will have to parse errors.
Any opinions what is the standard practice in these scenarios.