rejectMissingMethods results in an error

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
r
領域
api

調査の方向性

Start by reproducing the issue with rejectMissingMethods enabled, the GET / request to /post_only, and the logger output showing the missing FUN.VALUE argument. Trace the missing-method route handling and error response path; done means the same request returns HTTP 405 instead of HTTP 500 while the option remains enabled.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
R
スター
119
フォーク
17
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/plumber2 のほかの issue

posit-dev/plumber2 の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。