-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request failed: Ogiltigt land: Sweden #242
Comments
This seems to have been resolved without breaking changes, i.e both Sverige and Sweden now seems to be accepted as valid Country. |
Have you change some settings or anything? |
I'm sorry, I might have been mistaken, I don't know what I could have changed to fix it on my side but I did get some inconsistent exceptions when switching between "Sweden" & "Sverige". But as long as you have a consistent environment where you can reproduce it I'll leave it up to you to take over this issue as I'm actively developing with the environment where I first encountered the issue. |
It might be as simple as my missing the Api Exception, I'm dealing with issues related to that as I'm moving away from exceptions to non-fatal warnings instead to allow the application to continue running.
But my point is moot if as long as you have a sandbox and can reliably track down the issue. |
Well, I am not responsible for the Fortnox API and I am not sure if the SDK should "cover" this issue by doing translation... I will just report the issue to Fortnox support and see what's behind this |
So, I spoke with the support, and the Fortnox developers are aware of this issue already, so it will be fixed... eventually :) |
I think that the problem is like this. If the invoice has swedish (SE) as language the Swedish name for the country is needed. |
Bug report
Every other country that I've tested in the EU works with the culture-independent English country name.
We can see on the Fortnox front-end that when you input Sweden as Country it auto corrects to 'Sverige'.
But in the API, Sweden is not accepted at all and throws a FortnoxApiException.
Same with Czechia, which is expected by Fortnox to be 'Czech Republic'.
💻 Code
Actual behavior
Request failed: Ogiltigt land: Sweden
Expected behavior
We expect that all Country names conforming to English naming should be accepted by Fortnox as valid Country.
Notes
I currently use this utility function to circumvent this issue:
The text was updated successfully, but these errors were encountered: