riboseinc / digicert

Ruby bindings for the Digicert Services API
https://www.digicert.com/services/v2/documentation
MIT License
8 stars 10 forks source link

Getting Digicert::Errors::ServerError when calling Digicert::Order.all #134

Closed ramanbuttar closed 6 years ago

ramanbuttar commented 6 years ago

I am calling Digicert::Order.all(sort: :expires_at) and getting the following error:

Digicert::Errors::ServerError: [{"code"=>"internal_error", "message"=>"An internal error has occurred processing your request."}]

If I hit the Digicert API endpoint directly at https://www.digicert.com/services/v2/documentation/order/order-list, then there are no errors.

Looks like this gem is encountering some unexpected results from the Digicert API endpoint.

ronaldtse commented 6 years ago

@ramanbuttar thank you for letting us know. In any case, I don't think the API shouldn't be returning an internal error.

@abunashir could you have a look at this? Once we know the exact parameters that cause this we can report back to Digicert.

abunashir commented 6 years ago

Hi @ramanbuttar, the supported sort parameters are bit different than the usual response structure, and I think that's why it's returning a server error. To sort by expiring date you can use the following:

Digicert::Order.all(sort: "+valid_till")

Supported values are +valid_till, -valid_till, but please check the other supported options here, Thanks!

cc: @ronaldtse

ronaldtse commented 6 years ago

@abunashir could we put Clint’s list in the README (and maybe some validation in our code) to resolve future questions?

In addition, let’s find out what parameters caused the 500 error. Clint’s team will want to know that. Thanks!

abunashir commented 6 years ago

Sure thing @ronaldtse, should we create a wiki page or you would prefer to put that in the readme?

ronaldtse commented 6 years ago

Just the README is easier. Thanks!

ramanbuttar commented 6 years ago

Thanks guys. Digicert::Order.all(sort: "+valid_till") worked just fine.

ronaldtse commented 6 years ago

Thanks @ramanbuttar for following up!