Red Hat Bugzilla – Bug 480345
API activationkey.create - generates oracle error on bad input
Last modified: 2009-09-17 03:09:20 EDT
Description of problem:
When executing the activationkey.create apis, if the user provides a value for the "key" parameter that is too long, a DB exception is returned to the user; however, if the same were done from he UI, the user gets a more user friendly error (e.g. "Key cannot be greater than 45 characters.").
The API needs to be updated to perform the same validations that the UI currently provides and return the user with a more useful error message.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. execute activationkey.create() api with key greater than 45 characters
java.sql.SQLException exception generated (viewable in /var/log/tomcat5/catalina.out)
user friendly error/exception generated and thrown to user
Modifications made to master using git commit: 307a8e2325c896b9af12aecff7ec1b742ce9f24c
Updated the activationkey.create() apis to use the validator that is executed if user were creating the key from the UI. This will generate a more user friendly ValidationException to the user indicating info like "Key cannot be greater than 45 characters."
Spacewalk 0.5 released.
Spacewalk 0.5 has been released for long time ago.