Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Stripe
Stripe
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • StripeStripe
  • Merge Requests
  • !30

Closed
Created Apr 08, 2019 by JonGold@JonGoldReporter
  • Report abuse
Report abuse

Handle webhook permission errors

  • Overview 3
  • Commits 1
  • Changes 1

I was running 5.3.2 and ran into a similar problem with error handling not bubbling up on system checks - similar to this commit. However, in my case the issue is that the API key is valid, but lacks endpoint permissions. I got this error:

The provided key 'rk_live_********************O0YT' does not have the required permissions for this endpoint on account 'acct_1CZkiAHA8ztj9Qpg'. Having the 'rak_webhook_read' permission would allow this request to continue.

I'm proposing this as an alternative, since the error is of class \Stripe\Error\Permission, not \Stripe\Error\Authentication, and to display the specific error passed back from Stripe. I know that's not as nice as a prettier error message, but Stripe's messages are fairly readable, and this will handle other unknown errors more gracefully.

I left the "Stripe - API Key" title alone, since I can't think of an instance where it wouldn't be tied to the API key somehow.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: more-error-handling