Open aramter opened 1 year ago
Thanks for your contribution! :)
This is how the Locale is created Locale locale = const Locale(lang: Language.english, country: Country.unitedStates);
This is the function
Future
if (response.status.code == 200) {
if (kDebugMode) {
print("Account created successfully");
log("Token Data: ${response.data}");
print("Failed to create account");
}
}
} catch (e) { if (kDebugMode) { print(locale.country.toString());
print(locale.lang.toString());
print(locale.toString());
log("An error occurred: $e");
}
} }
And this is how it is called await createMastodonAccount(username: 'xxxxr', email: 'xxxx@gmail.com', agreement: true, password: 'xxxx',locale: locale, reason: 'xxxxx');
1. Current bug behavior
when sending Local from Flutter App for example (en_US) to open an account We get error ✅ Body: {"error":"Validation failed: Locale is not included in the list","details":{"locale":[{"error":"ERR_INCLUSION","description":"is not included in the list"}]}}
2. Expected behavior
Should open the account, we have 'en' as default in Mastodon server we tried to use 'en_US' in env file, still getting the same error.
3. Steps to reproduce
Call create account with any local en, en_US de, de_De ... - still getting the error
4. Flutter doctor output
Flutter outpu I/flutter (15297): Country.unitedStates I/flutter (15297): Language.english I/flutter (15297): en_US [log] An error occurred: MastodonException: Required parameter is missing or improperly formatted.
✅ Status Code: 422
✅ Request: POST https://mastodon-dev.connectto.com/api/v1/accounts?
✅ Headers: {connection: keep-alive, cache-control: private, no-store, transfer-encoding: chunked, date: Thu, 26 Oct 2023 21:40:26 GMT, x-ratelimit-limit: 5, x-ratelimit-reset: 2023-10-26T22:00:00.122426Z, vary: Authorization, Origin, strict-transport-security: max-age=63072000; includeSubDomains, referrer-policy: same-origin, x-ratelimit-remaining: 4, content-type: application/json; charset=utf-8, x-xss-protection: 0, server: Mastodon, x-request-id: cfde03da-4b9b-4bf5-9a98-86781f3d3bb1, x-runtime: 0.288634, x-frame-options: DENY, x-content-type-options: nosniff, content-security-policy: default-src 'none'; frame-ancestors 'none'; form-action 'none'}
✅ Body: {"error":"Validation failed: Locale is not included in the list","details":{"locale":[{"error":"ERR_INCLUSION","description":"is not included in the list"}]}}
Please create an Issue if you have a question or suggestion for this exception. https://github.com/mastodon-dart/mastodon-api/issues
5. More environment information
6. Log information
I/flutter (15297): Country.unitedStates I/flutter (15297): Language.english I/flutter (15297): en_US [log] An error occurred: MastodonException: Required parameter is missing or improperly formatted.
✅ Status Code: 422
✅ Request: POST https://mastodon-dev.connectto.com/api/v1/accounts?
✅ Headers: {connection: keep-alive, cache-control: private, no-store, transfer-encoding: chunked, date: Thu, 26 Oct 2023 21:40:26 GMT, x-ratelimit-limit: 5, x-ratelimit-reset: 2023-10-26T22:00:00.122426Z, vary: Authorization, Origin, strict-transport-security: max-age=63072000; includeSubDomains, referrer-policy: same-origin, x-ratelimit-remaining: 4, content-type: application/json; charset=utf-8, x-xss-protection: 0, server: Mastodon, x-request-id: cfde03da-4b9b-4bf5-9a98-86781f3d3bb1, x-runtime: 0.288634, x-frame-options: DENY, x-content-type-options: nosniff, content-security-policy: default-src 'none'; frame-ancestors 'none'; form-action 'none'}
✅ Body: {"error":"Validation failed: Locale is not included in the list","details":{"locale":[{"error":"ERR_INCLUSION","description":"is not included in the list"}]}}
Please create an Issue if you have a question or suggestion for this exception. https://github.com/mastodon-dart/mastodon-api/issues