close
Skip to content

Throw a more obvious error when the queue is empty on construction#43

Merged
kevinsmith merged 3 commits into2.xfrom
better-empty-queue-error
Jul 28, 2019
Merged

Throw a more obvious error when the queue is empty on construction#43
kevinsmith merged 3 commits into2.xfrom
better-empty-queue-error

Conversation

@kevinsmith
Copy link
Copy Markdown
Contributor

This provides clearer language for the error raised when an empty queue is passed into Relay on construction. Should fix #42.

@urugator and @niden, mind checking this one out?

@urugator
Copy link
Copy Markdown

urugator commented Jun 9, 2019

I think it's fine. Similar error will be thrown if resolver returns non-middleware, so you may also consider adding is_callable($middleware) check with a better hint prior invoking the middleware:
https://github.com/relayphp/Relay.Relay/blob/2.x/src/Runner.php#L39

@kevinsmith kevinsmith merged commit e1ec1bd into 2.x Jul 28, 2019
@kevinsmith kevinsmith deleted the better-empty-queue-error branch July 28, 2019 18:05
@kevinsmith kevinsmith mentioned this pull request Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.x cryptic error on empty queue

2 participants