这是indexloc提供的服务,不要输入任何密码
Skip to content

httpsCallable error code format change from v8 to v9 should be warned loudly #6281

@qqpann

Description

@qqpann

[REQUIRED] Describe your environment

  • Operating System version: _____
  • Browser version: _____
  • Firebase SDK version: _____
  • Firebase Product: _____ (auth, database, storage, etc)

[REQUIRED] Describe the problem

v8:

expect(e.code).to.equal(code);

v9:

expect(e.code).to.match(new RegExp(`functions.*/${code}`));

The change of error code format (it attaches "functions/" at the beginning since v9) is not mentioned in the v8 v9 migration guide. It should be well announced in the documentation.
Otherwise, if a user relies on the error code string in their app, the upgrade will cause a crush (like me 😢 ).

Steps to reproduce:

Relevant Code:

// TODO(you): code here to reproduce the problem

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions