<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def handle_404(request, exception):
    '''Handle 404 Not Found
    This handler should be used to handle error http 404 not found for all
    endpoints or if resource not available.
    '''
    error = format_error(title='Resource not found', detail=str(exception))
    return json(return_an_error(error), status=HTTPStatus.NOT_FOUND)