# 82002: Error on Twilio Function response

Log Type: APPLICATION

Log Level: ERROR

## Description

Your Function invocation resulted in StatusCode 5xx.

### Possible causes

* Your Function timed out before responding.
* Your Function returned an error response.

### Possible solutions

* Your Function must contain a callback.
* Make sure you place the Function callback `callback(err, response)` is placed correctly in your Function code.
* If you are using a JavaScript promise, make sure the callback is called in both success and catch blocks.
* Your Function responded with an error.
