api-examples icon indicating copy to clipboard operation
api-examples copied to clipboard

500 error when requesting transactions up to today

Open pablomargareto opened this issue 4 years ago • 2 comments

I get a 500 error when I try to fetch transactions between 1st of June and 21st of June (today). If I change the endDate to yesterday, everything works fine:

Requested URL (with the right headers): https://publicapi.sbanken.no/apibeta/api/v1/transactions/{accountId}?startDate=2021-06-01&endDate=2021-06-21

Response: Exception: Request failed for https://publicapi.sbanken.no returned code 500. Truncated server response: {"Type":"","Title":"Could not complete the request.","Status":500,"Detail":"An error has occured.","Instance":null,"Extensions":{"traceId":"4120540... (use muteHttpExceptions option to examine full response)

I assume this is a server side error... sorry if I am reporting it on the wrong place.

pablomargareto avatar Jun 21 '21 08:06 pablomargareto

That looks like a bug. We'll investigate. As a workaround, you can omit the endDate (that means the endDate will be set to Date.Now) This https://publicapi.sbanken.no/apibeta/api/v1/transactions/{accountId}?startDate=2021-06-01 should give you the result you want. Let us know if that is not the case.

bjartekh avatar Jul 02 '21 12:07 bjartekh

Super! Thanks!

pablomargareto avatar Jul 02 '21 14:07 pablomargareto