Bug #31685 create nice error mappings for all enterprise.mysql.com REST error messages
Submitted: 18 Oct 2007 1:49 Modified: 13 May 2016 9:17
Reporter: Sloan Childers Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S2 (Serious)
Version:1.3.0.8130 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[18 Oct 2007 1:49] Sloan Childers
Description:
It is possible to get an error message when trying to update a network license that has absolutely nothing to do with the error returned from enterprise.mysql.com.  This has already caused numerous support issues.

How to repeat:
Work with the enterprise web team and read the server code to determine all possible errors that can be returned.

Suggested fix:
Talk with Bryan Alsdorf about adding unique numeric numbers to each of the error messages he returns and get a list of all possible errors.  Create nice error messages for all of them that are context sensitive to what the UI is trying to do (update license, update bundle, etc.) and provide the actual low level message in a link to further information so support can get access to the actual low level message when the customer calls in upset that their product won't work.
[23 Oct 2007 1:54] Joshua Ganderson
The merlin constants file contained the following error mappings:
1008 - user does not exist
1010 - connection failed
1011 - no alerts found
1012 - advisor update is empty
1013 - advisor bundle is up to date
1014 - trial expired
1016 - no subscription is installed

I emailed Bryan asking if A) there were any exceptions that were somewhat generic and could be split out into multiple exceptions and B) if there were any exceptions that could be returned that we're not handling.

It may be that there's not much work to do here and the prior confusion was due to a mistake on our (my) side when handling a particular network error. Providing access to the real error string from network is still a good idea regardless.
[26 Nov 2007 21:41] Sloan Childers
<?xml version='1.0'?>
<exceptions>
  <error><![CDATA[The email address / password combination could not be found in the system.]]></error>
  <ERROR_NUMBER>105</ERROR_NUMBER>
</exceptions>

Let me know if you want to tweak this, I decided to just implement it instead of continually discussing it.

The error codes have no logic too them, just sequential. Let me know if you would like to organize them into families.

define('MERLIN_ERROR_API_TECHNICAL_PROBLEM', 100);
define('MERLIN_ERROR_NO_ADVISOR_ACCESS', 101);
define('MERLIN_ERROR_MISSING_PARAMETER_COMMAND', 102);
define('MERLIN_ERROR_MISSING_PARAMETER_EMAIL', 103);
define('MERLIN_ERROR_MISSING_PARAMETER_PASSWORD', 104);
define('MERLIN_ERROR_INVALID_LOGIN', 105);
define('MERLIN_ERROR_NO_ACTIVE_CONTRACT', 106);
define('MERLIN_ERROR_MISSING_PARAMETER_CURRENT_VERSION', 107);
define('MERLIN_ERROR_ADVISORS_UP_TO_DATE', 108);
define('MERLIN_ERROR_UNKNOWN_COMMAND', 109);
[6 May 2008 22:54] Joshua Ganderson
appears to be correct in 2.0
[7 May 2008 0:46] Bill Weber
verified we are using the same error message scheme (not remapping) in build 2.0.0.6027 as in 1.3 (seems this is a dup of 30873)