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)