code: def error(request, message, extra_tags='', fail_silently=False, async=False):
      
      if ASYNC and async:
          messages.debug(_get_user(request), message)
      else:
          add_message(request, constants.ERROR, message, extra_tags=extra_tags,
                      fail_silently=fail_silently)
docs: Adds a message with the ``ERROR`` level.