Skip to content

[Bug] Facade methods throw wrong exception #624

@mtorromeo

Description

@mtorromeo

Describe the bug

When calling Facade methods from the wrong context a RuntimeException is thrown but the phpdoc @throws tag documents that the Temporal\Exception\OutOfContextException exception should be thrown instead.

From a superficial search, it seems like the OutOfContextException is never used in the codebase.

Minimal Reproduction

❯ php -a
Interactive shell

php > require_once 'vendor/autoload.php';
php > \Temporal\Activity::getInfo();
PHP Warning:  Uncaught RuntimeException: Calling facade methods can only be made from the currently running process in ...

Environment/Versions

temporal/sdk v2.14.1

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions