Skip to content

rejectMissingMethods results in an error #86

Open

Description

@ElianHugh

I'm finding that if I enable rejectMissingMethods, it returns an error 500 instead of a 405:

options(plumber2.rejectMissingMethods = TRUE)

#' @plumber
function(api) {
    plumber2::api_logger(api, logger = plumber2::logger_console())
}

#' @get /
function() {
    1L
}

#' @post /post_only
function() {
    1L
}

Requesting the POST-only route with GET:

> curl -i http://127.0.0.1:8080/post_only 
HTTP/1.1 500 Internal Server Error
Date: Wed, 06 May 2026 07:35:15 GMT
content-type: text/plain
date: Wed, 06 May 2026 07:35:15 GMT
set-cookie: fiery_id=4ae8b6abdd745a588bebb8c10f9df8ae959f565c040419d57487b9cce953f40c; HttpOnly; Path=/; SameSite=Strict
Content-Length: 21

Internal Server Error%                                                                                             

Where the logger outputs

2026-05-06 17:35:15.012286 - error: argument "FUN.VALUE" is missing, with no default

Disabling the option avoids the internal error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions