# 70002: Integration target returned an error status Identifier: `integration_target_returned_an_error_status` An integration invoked an HTTP target, such as a webhook, which replied with an HTTP status outside the successful 2xx range. Ably treats any non-2xx response as a failed delivery. ## What you should do Determine the HTTP status code the target returned from the error message, and check the target's own logs, since it received the request and chose to reject it. A 4xx status points to the request being treated as malformed or unauthorized, so check any authentication, required headers, or payload shape the target enforces. A 5xx status points to a fault in the target itself. To have a delivery counted as successful, the target must respond with a 2xx status. Ably retries server errors with a backoff, so a transient 5xx recovers on its own; repeated client errors will keep failing until the target accepts the request. ## Why it happens When a message matches one of your [integrations](https://ably.com/docs/integrations.md), Ably invokes the target you configured. For an HTTP target such as a webhook, only a 2xx response counts as success; this error means the target replied with something else, commonly a 4xx because it rejected the request or a 5xx because it failed to process it. Where no response is received at all, the error is reported as 70001 instead. ## What you'll see The error is reported with code 70002, and the target's own status code is included in the message, which takes the form `Webhook operation failed (post operation returned unexpected code); statusCode = ` or `POST returned HTTP status `.