opsgenie / opsgenie-nodejs-sdk

OpsGenie Node.js SDK

Home Page:https://www.opsgenie.com/docs/api-and-client-libraries/opsgenie-nodejs-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alerts V2 List API throws 500 errors when createdAt is passed as a decimal value

bakatz opened this issue · comments

For example, the following params causes a 500 error to be returned from the server:


var activeAlertsParams = {
        query: 'status != closed createdAt >=151003410.486',
        offset: 0,
        limit: 1,
        sort: 'alias',
        order: 'desc'
      }

...while the following works fine:

var activeAlertsParams = {
        query: 'status != closed createdAt >=151003410',
        offset: 0,
        limit: 1,
        sort: 'alias',
        order: 'desc'
      }

I would expect a 422 / 400 status code in this case, not a 500.

Yes, you are right. We will take care of this. Thank you for reporting 👍

No worries!

@bakatz I've confirmed that this problem is related with API, not Node.js SDK. We have created an issue for this. Although I cannot give the exact day, I've been informed that the issue will be handled in the next sprint so the ETA is 2-3 weeks tops. Until then, you may omit the decimal parts if that works for you. Apologize for the inconvenience this has caused. We'll let you know when this is fixed.