human
Can you provide a the Python code you requested given the following:
Complete the below
def jsonable_error(status=500, message='The    Studio    servers    encountered    an    error'):

    ''''A decorator to make an error view return an JSON-formatted message if
    it was requested via AJAX.'
    '''
assistant
#Here is the Python code you requested.
    def outer(func):
        @functools.wraps(func)
        def inner(request, *args, **kwargs):
            if request.is_ajax():
                content = dump_js_escaped_json({'error': message})
                return HttpResponse(content, content_type='application/json', status=status)
            else:
                return func(request, *args, **kwargs)
        return inner
    return outer