solusio / solusiovps

SolusIO WHMCS VPS Provisioning module
Apache License 2.0
23 stars 8 forks source link

API error #28

Closed idealapps-code closed 4 years ago

idealapps-code commented 4 years ago

We have an API error in WHMCS when creating an instance

Module Command Error Client error response [url] https://[hostname]/api/v1/users/1 [status code] 422 [reason phrase] Unprocessable Entity

lonesync commented 4 years ago

Had same error happen and this related to domain field, entering a generic hostname without domain format presented error. Entering domain format (domain.com) or (sub.domain.com) corrected with successful corresponding hostname on server. Server hostname will be name prior to (.com) for domain and sub-name in sub.domain format.

idealapps-code commented 4 years ago

@lonesync Have tried test.test.com and test.com but getting the same error.

lonesync commented 4 years ago

Interesting, what version are you running? Running v1.1.1 here, was hopeful this would be a solution for you as well. Does make one curious as to what could be triggering...

lonesync commented 4 years ago

Actually, one other scenario was using Admin email in testing.

idealapps-code commented 4 years ago

@lonesync Using the latest 1.1.2 Yes, I'm using the admin email as a user too.

ryanpek commented 4 years ago

If the user enters a bad hostname, it should just set a random one. Its pretty sensitive.

I mean hostnames in admin are 'trevion-op8nta' what does it matter if its yourdomain.com?

lonesync commented 4 years ago

Would be nice to have an error come back with an appropriate correction message for the user.

True one could go with random naming, it's just nice to have a matching hostname/domain - when looking through multi servers it's quick to spot the desired server. Random names do lead to mistakes when deleting, along with billing questions - matching across the board makes things much smoother overall.

laurisb commented 4 years ago

Fixed in v1.1.3.