Skip to content

Return the same error codes as provided by 3scale backend #14

@MarkCheshire

Description

@MarkCheshire

https://support.3scale.net/forum/topics/threescale-client-authrep-doesn-t-return-error_code-on-throttled-requests

The API doc says that authorize() returns a 409 status code and a reason message when a request is denied due to throttling. The Ruby client swallows the status code, so I have to parse the error_message. It would be nice to set the @error_code. Here’s an example response:

#<ThreeScale::AuthorizeResponse:0×007ffbdc702620 @usage_reports=
[#<ThreeScale::AuthorizeResponse::UsageReport:0×007ffbe1dbca10 
@metric=“hits”, @period=:minute, @period_start=“2014-05-23 19:40:00 +0000”, 
@period_end=“2014-05-23 19:41:00 +0000”, @current_value=1, @max_value=1>], 
@error_code=nil, @error_message=“usage limits are exceeded”, @plan=“Test Plan”>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions