type: authentication error?

119 views
Skip to first unread message

Tejas

unread,
Sep 22, 2016, 8:34:03 AM9/22/16
to Stripe API Discussion
{"type":"invalid_request_error","message":"Invalid API Key provided: sk_live_*********************<end of key>","status":401}

Based on the Go library (https://github.com/stripe/stripe-go/blob/master/error.go#L14), I thought this would have type: "authentication_error". Am I missing something?

Fred Alger

unread,
Sep 22, 2016, 9:57:36 PM9/22/16
to api-d...@lists.stripe.com
Hey there,

Great question! I agree that "authentication_error" makes the most sense here, but in testing I can't find any instances where that error is returned by the Stripe API. invalid_request_error is used for:

1. Wrong/missing API key
2. Wrong Connect credentials

Of course, as you showed: the error message does indicate the authentication failure in a human-readable way. A more specific error code is something I'd like to see here as well; I've created an internal request to look at improving this in the future.

Hope that clears things up!

Best,
- Fred.
 


On Wed, Sep 21, 2016 at 8:29 PM, Tejas <te...@segment.com> wrote:
{"type":"invalid_request_error","message":"Invalid API Key provided: sk_live_*********************<end of key>","status":401}

Based on the Go library (https://github.com/stripe/stripe-go/blob/master/error.go#L14), I thought this would have type: "authentication_error". Am I missing something?

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Tejas Manohar

unread,
Sep 23, 2016, 7:28:50 AM9/23/16
to api-d...@lists.stripe.com
I also see invalid request error for rate limits... which seems weird compared to the constants in go lib.

On Thu, Sep 22, 2016 at 6:57 PM 'Fred Alger' via Stripe API Discussion <api-d...@lists.stripe.com> wrote:
Hey there,

Great question! I agree that "authentication_error" makes the most sense here, but in testing I can't find any instances where that error is returned by the Stripe API. invalid_request_error is used for:

1. Wrong/missing API key
2. Wrong Connect credentials

Of course, as you showed: the error message does indicate the authentication failure in a human-readable way. A more specific error code is something I'd like to see here as well; I've created an internal request to look at improving this in the future.

Hope that clears things up!

Best,
- Fred.
 

On Wed, Sep 21, 2016 at 8:29 PM, Tejas <te...@segment.com> wrote:
{"type":"invalid_request_error","message":"Invalid API Key provided: sk_live_*********************<end of key>","status":401}

Based on the Go library (https://github.com/stripe/stripe-go/blob/master/error.go#L14), I thought this would have type: "authentication_error". Am I missing something?

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.
--

Best regards,

Tejas Manohar
Reply all
Reply to author
Forward
0 new messages