I'm trying to create a theme in fusionauth using the javascript FusionAuthClient. Basically the idea is to clone the default theme and to simply override some of the templates.
this.fusionClient.retrieveThemes().then((response) => {
return response.successResponse.themes[0].id;
}).then((defaultThemeId) => {
// set this to instruct fusion to clone default theme
request.sourceThemeId = defaultThemeId;
request.theme.name = 'Some-Theme-Name';
return this.fusionClient.createTheme('SomeCustomId', request);
}).then((response) => {
this.context.themeId = response.successResponse.themes[0].id;
// -> follows tenant creation etc.
});
The request body json is same as in the documentation here https://fusionauth.io/docs/v1/tech/apis/themes
When I execute this, after the fusionClient.createTheme('id', request)
I get an error response
Error provisioning the security
{"statusCode":400,"errorResponse":{"fieldErrors":{"themeId":[{"code":"[couldNotConvert]themeId"}]}},"successResponse":null,"exception":null}
Where the themeId
is the first argument passed to createTheme
method I guess, what is wrong with it I've no idea. According to documentation, this argument is optional and I tried differen t values for it but with the same error as autcome.
I don't see any exceptions in fusion's log.
Any ideas what happens and how to overcome this?