Skip to content

Throw Error When Provider is not Initialized #39

@emilyrohrbough

Description

@emilyrohrbough

Please fill out the below template as best you can.

Description of Issue

Add meaningful error when Provider is not Initialized and a event is triggered or listener is added/called. For example, if Prover.trigger is called when the Provider has not been initialized, it attempts to access this.application which is created upon Provider.init(). If the Provider has not been initialized, it throws the error

Error: Cannot read property 'trigger' of undefined
at Provider.trigger

This is error does not make it immediately obvious that the issue is related to the Provider initialization.

Steps to Reproduce the Issue

  1. Setup an application which called Provider.trigger() without initializing the provider
  2. See error in the console

Expected Outcomes

  • Throw Error message saying something like "Cannot handle/perform because the Provider has not been initialized"

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