"Edit application" page fails validation
dylannz opened this issue · 2 comments
Describe the bug
When trying to edit any of the 3 available attributes on the "Edit application" page (icon, application URL, description) within the web panel, I get the following error:
Digging a bit deeper, I can see that the server is returning an HTTP 400 status with the following error in the response body:
{"error":"Request validation failed","validation":[{"keyword":"required","dataPath":".body","schemaPath":"#/components/schemas/applicationSchema/required","params":{"missingProperty":"appName"},"message":"should have required property 'appName'"}]}
But as you can see on the form, appName is not a field that is visible on the page:
So there is no way for the user to fix this. Maybe some of these fields are normally configured via the SDK configuration within the code and nobody usually touches this part of the app? Either way, seems like a bug!
Steps to reproduce the bug
Configure ruby on rails application to use unleash SDK like so (where unleash is installed on https://example.com):
config/initializers/unleash.rb:
Unleash.configure do |config|
config.app_name = 'MyRailsApplication'
config.url = 'https://example.com/api'
config.custom_http_headers = {'Authorization': ENV['UNLEASH_SERVER_API_KEY']}
end
UNLEASH = Unleash::Client.new
Start up the application, then navigate to:
https://example.com/applications/MyRailsApplication
Click the "Edit application" tab
Try to change any of the 3 fields displayed (icon, application URL, description)
Then you will see the error
Expected behavior
No error
Logs, error output, etc.
No response
Screenshots
No response
Additional context
No response
Unleash version
4.22.5
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
unleash-client-ruby:4.4.2
Hi, @dylannz ! Thanks for bringing this to our attention. I will forward it to the right team and get back to you.
I've been able to reproduce this and I've raised a bug internally to look into it in our upcoming cycle