EC-CUBE / EC-CUBE/eccube-api4

WebHook URLが接続できない場合のエラー処理が適切でない可能性がある

Open
#134 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
9
Forks
18
PR merge metrics
No merged PRs in 30d

Description

本プラグインをインストール後にテスト用にWebHookのURLを追加してみたところ、URLの入力ミスで接続できず、WebHookへのリクエスト送信時に以下のエラーが画面に出力されました。

`Argument 1 passed to Plugin\Api\Service\WebHookService::Plugin\Api\Service\{closure}() must be an instance of GuzzleHttp\Exception\RequestException, instance of GuzzleHttp\Exception\ConnectException given`

[該当コード](https://github.com/EC-CUBE/eccube-api4/blob/2.1.3/Service/WebHookService.php#L92
)では `RequestException` を想定しているのですが、その手前でエラーになった場合 `ConnectException` が渡ってくる可能性があるので `\Exception` を指定したほうが良いかと思いますが、エラーハンドリングの想定スコープが分からなかったためissueのみ上げさせていただきます。

## 環境

eccube/api 2.1.3

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.