Skip to content

[Feature request]: Silence "[error] request--callback: peculiar error" when aborting without setting custom variables #226

@daanturo

Description

@daanturo

Currently when using request-abort, an error will be echoed:

[error] request--callback: peculiar error

This cannot be disabled without setting request-message-level (If I understand correctly).

Reproduce

(progn
  (let* ((req
          (request
           "http://httpbin.org/post"
           :type "POST"
           :data '(("key" . "value"))
           :error 'ignore
           :parser 'json-read
           :success (cl-function 'ignore))))
    ;; I tried let-binding here, but callbacks are asynchronous so they aren't
    ;; affected
    (dlet ((request-message-level -1))
      (request-abort req))
    ""))

Observed

[error] request--callback: peculiar error appears in the echo area and *Message*.

Expected

Silent

Is it possible to abort the running request, without informing the user? My package depends of request, so setq-ing an user option without their consent is not polite. Maybe adding more optional arguments to request-abort to silence errors?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions