Nager.Date icon indicating copy to clipboard operation
Nager.Date copied to clipboard

Countries not supported return 204 response by IsTodayPublicHoliday

Open CookieMonk opened this issue 3 years ago • 3 comments

More information

Hi Guys, First of all, thanks for creating this project!

I was testing the IsTodayPublicHoliday request using various countries: PL, GB, GR and all works fine. However, I've started playing with countries that are not supported, like Indie - IN, Ethopia - ET and instead of getting 404 response, I got 204, which was a bit confusing.

Right now I need to first find the country on the list of supported countries (AvailableCountries) and if there is a match run IsTodayPublicHoliday.

Is this a "feature" or a bug :)

Regards, Marcin

CookieMonk avatar Jul 13 '22 14:07 CookieMonk

This is because I can't get along with the 404 code, it gives me too much of a feeling that the endpoint doesn't exist. But with a 400 I could make friends.

tinohager avatar Jul 14 '22 08:07 tinohager

Thanks for the reply! 400 "Validation Error" Sounds good for me. Also country code that contain 3 letters or 1 letter, both of course provided by mistake, also return 404, so after the change it would be good to get 400 too.

CookieMonk avatar Jul 14 '22 09:07 CookieMonk