LibOFX

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

ofx_error_msg.hh
Go to the documentation of this file.

    00001 /***************************************************************************
    00002                           ofx_data_struct.h  -  description
    00003                              -------------------
    00004     begin                : Tue Mar 19 2002
    00005     copyright            : (C) 2002 by Benoit Gr�goire
    00006     email                : benoitg@coeus.ca
    00007  ***************************************************************************/
    00011 /***************************************************************************
    00012  *                                                                         *
    00013  *   This program is free software; you can redistribute it and/or modify  *
    00014  *   it under the terms of the GNU General Public License as published by  *
    00015  *   the Free Software Foundation; either version 2 of the License, or     *
    00016  *   (at your option) any later version.                                   *
    00017  *                                                                         *
    00018  ***************************************************************************/
    00019 #ifndef OFX_DATA_STRUCT_H
    00020 #define OFX_DATA_STRUCT_H
    00021
    00023 struct ErrorMsg
    00024 {
    00025   int code;
    00026   const char * name;
    00027   const char * description;
    00028 };
    00029
    00031
    00034 const ErrorMsg error_msgs_list[] =
    00035 {
    00036   {0, "Success", "The server successfully processed the request."},
    00037   {1, "Client is up-to-date", "Based on the client timestamp, the client has the latest information. The response does not supply any additional information."},
    00038   {2000, "General error", "Error other than those specified by the remaining error codes. (Note: Servers should provide a more specific error whenever possible. Error code 2000 should be reserved for cases in which a more specific code is not available.)"},
    00039   {2001, "Invalid account", ""},
    00040   {2002, "General account error", "Account error not specified by the remaining error codes."},
    00041   {2003, "Account not found", "The specified account number does not correspond to one of the user's accounts."},
    00042   {2004, "Account closed", "The specified account number corresponds to an account that has been closed."},
    00043   {2005, "Account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
    00044   {2006, "Source account not found", "The specified account number does not correspond to one of the user's accounts."},
    00045   {2007, "Source account closed", "The specified account number corresponds to an account that has been closed."},
    00046   {2008, "Source account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
    00047   {2009, "Destination account not found", "The specified account number does not correspond to one of the user's accounts."},
    00048   {2010, "Destination account closed", "The specified account number corresponds to an account that has been closed."},
    00049   {2011, "Destination account not authorized", "The user is not authorized to perform this action on the account, or the server does not allow this type of action to be performed on the account."},
    00050   {2012, "Invalid amount", "The specified amount is not valid for this action; for example, the user specified a negative payment amount."},
    00051   {2014, "Date too soon", "The server cannot process the requested action by the date specified by the user."},
    00052   {2015, "Date too far in future", "The server cannot accept requests for an action that far in the future."},
    00053   {2016, "Transaction already committed", "Transaction has entered the processing loop and cannot be modified/cancelled using OFX. The transaction may still be cancelled or modified using other means (for example, a phone call to Customer Service)."},
    00054   {2017, "Already canceled", "The transaction cannot be canceled or modified because it has already been canceled."},
    00055   {2018, "Unknown server ID", "The specified server ID does not exist or no longer exists."},
    00056   {2019, "Duplicate request", "A request with this <TRNUID> has already been received and processed."},
    00057   {2020, "Invalid date", "The specified datetime stamp cannot be parsed; for instance, the datetime stamp specifies 25:00 hours."},
    00058   {2021, "Unsupported version", "The server does not support the requested version. The version of the message set specified by the client is not supported by this server."},
    00059   {2022, "Invalid TAN", "The server was unable to validate the TAN sent in the request."},
    00060   {2023, "Unknown FITID", "The specified FITID/BILLID does not exist or no longer exists. [BILLID not found in the billing message sets]"},
    00061   {2025, "Branch ID missing", "A <BRANCHID> value must be provided in the <BANKACCTFROM> aggregate for this country system, but this field is missing."},
    00062   {2026, "Bank name doesn't match bank ID", "The value of <BANKNAME> in the <EXTBANKACCTTO> aggregate is inconsistent with the value of <BANKID> in the <BANKACCTTO> aggregate."},
    00063   {2027, "Invalid date range", "Response for non-overlapping dates, date ranges in the future, et cetera."},
    00064   {2028, "Requested element unknown", "One or more elements of the request were not recognized by the server or the server (as noted in the FI Profile) does not support the elements. The server executed the element transactions it understood and supported. For example, the request file included private tags in a <PMTRQ> but the server was able to execute the rest of the request."},
    00065   {6500, "<REJECTIFMISSING>Y invalid without <TOKEN>", "This error code may appear <SYNCERROR> element of an <xxxSYNCRS> wrapper (in <PRESDLVMSGSRSV1> and V2 message set responses) or the <CODE> contained in any embedded transaction wrappers within a sync response. The corresponding sync request wrapper included <REJECTIFMISSING>Y with <REFRESH>Y or <TOKENONLY>Y, which is illegal."},
    00066   {6501, "Embedded transactions in request failed to process: Out of date", "<REJECTIFMISSING>Y and embedded transactions appeared in the request sync wrapper and the provided <TOKEN> was out of date. This code should be used in the <SYNCERROR> of the response sync wrapper."},
    00067   {6502, "Unable to process embedded transaction due to out-of-date <TOKEN>", "Used in response transaction wrapper for embedded transactions when <SYNCERROR>6501 appears in the surrounding sync wrapper."},
    00068   {10000, "Stop check in process", "Stop check is already in process."},
    00069   {10500, "Too many checks to process", "The stop-payment request <STPCHKRQ> specifies too many checks."},
    00070   {10501, "Invalid payee", "Payee error not specified by the remainingerror codes."},
    00071   {10502, "Invalid payee address", "Some portion of the payee's address is incorrect or unknown."},
    00072   {10503, "Invalid payee account number", "The account number <PAYACCT> of the requested payee is invalid."},
    00073   {10504, "Insufficient funds", "The server cannot process the request because the specified account does not have enough funds."},
    00074   {10505, "Cannot modify element", "The server does not allow modifications to one or more values in a modification request."},
    00075   {10506, "Cannot modify source account", "Reserved for future use."},
    00076   {10507, "Cannot modify destination account", "Reserved for future use."},
    00077   {10508, "Invalid frequency", "The specified frequency <FREQ> does not match one of the accepted frequencies for recurring transactions."},
    00078   {10509, "Model already canceled", "The server has already canceled the specified recurring model."},
    00079   {10510, "Invalid payee ID", "The specified payee ID does not exist or no longer exists."},
    00080   {10511, "Invalid payee city", "The specified city is incorrect or unknown."},
    00081   {10512, "Invalid payee state", "The specified state is incorrect or unknown."},
    00082   {10513, "Invalid payee postal code", "The specified postal code is incorrect or unknown."},
    00083   {10514, "Transaction already processed", "Transaction has already been sent or date due is past"},
    00084   {10515, "Payee not modifiable by client", "The server does not allow clients to change payee information."},
    00085   {10516, "Wire beneficiary invalid", "The specified wire beneficiary does not exist or no longer exists."},
    00086   {10517, "Invalid payee name", "The server does not recognize the specified payee name."},
    00087   {10518, "Unknown model ID", "The specified model ID does not exist or no longer exists."},
    00088   {10519, "Invalid payee list ID", "The specified payee list ID does not exist or no longer exists."},
    00089   {10600, "Table type not found", "The specified table type is not recognized or does not exist."},
    00090   {12250, "Investment transaction download not supported (WARN)", "The server does not support investment transaction download."},
    00091   {12251, "Investment position download not supported (WARN)", "The server does not support investment position download."},
    00092   {12252, "Investment positions for specified date not available", "The server does not support investment positions for the specified date."},
    00093   {12253, "Investment open order download not supported (WARN)", "The server does not support open order download."},
    00094   {12254, "Investment balances download not supported (WARN)", "The server does not support investment balances download."},
    00095   {12255, "401(k) not available for this account", "401(k) information requested from a non-401(k) account."},
    00096   {12500, "One or more securities not found", "The server could not find the requested securities."},
    00097   {13000, "User ID & password will be sent out-of-band (INFO)", "The server will send the user ID and password via postal mail, e-mail, or another means. The accompanying message will provide details."},
    00098   {13500, "Unable to enroll user", "The server could not enroll the user."},
    00099   {13501, "User already enrolled", "The server has already enrolled the user."},
    00100   {13502, "Invalid service", "The server does not support the service <SVC> specified in the service-activation request."},
    00101   {13503, "Cannot change user information", "The server does not support the <CHGUSERINFORQ> request."},
    00102   {13504, "<FI> Missing or Invalid in <SONRQ>", "The FI requires the client to provide the <FI> aggregate in the <SONRQ> request, but either none was provided, or the one provided was invalid."},
    00103   {14500, "1099 forms not available", "1099 forms are not yet available for the tax year requested."},
    00104   {14501, "1099 forms not available for user ID", "This user does not have any 1099 forms available."},
    00105   {14600, "W2 forms not available", "W2 forms are not yet available for the tax year requested."},
    00106   {14601, "W2 forms not available for user ID", "The user does not have any W2 forms available."},
    00107   {14700, "1098 forms not available", "1098 forms are not yet available for the tax year requested."},
    00108   {14701, "1098 forms not available for user ID", "The user does not have any 1098 forms available."},
    00109   {15000, "Must change USERPASS", "The user must change his or her <USERPASS> number as part of the next OFX request."},
    00110   {15500, "Signon invalid", "The user cannot signon because he or she entered an invalid user ID or password."},
    00111   {15501, "Customer account already in use", "The server allows only one connection at a time, and another user is already signed on. Please try again later."},
    00112   {15502, "USERPASS lockout", "The server has received too many failed signon attempts for this user. Please call the FI's technical support number."},
    00113   {15503, "Could not change USERPASS", "The server does not support the <PINCHRQ> request."},
    00114   {15504, "Could not provide random data", "The server could not generate random data as requested by the <CHALLENGERQ>."},
    00115   {15505, "Country system not supported", "The server does not support the country specified in the <COUNTRY> field of the <SONRQ> aggregate."},
    00116   {15506, "Empty signon not supported", "The server does not support signons not accompanied by some other transaction."},
    00117   {15507, "Signon invalid without supporting pin change request", "The OFX block associated with the signon does not contain a pin change request and should."},
    00118   {15508, "Transaction not authorized", "Current user is not authorized to perform this action on behalf of the <USERID>."},
    00119   {16500, "HTML not allowed", "The server does not accept HTML formatting in the request."},
    00120   {16501, "Unknown mail To:", "The server was unable to send mail to the specified Internet address."},
    00121   {16502, "Invalid URL", "The server could not parse the URL."},
    00122   {16503, "Unable to get URL", "The server was unable to retrieve the information at this URL (e.g., an HTTP 400 or 500 series error)."},
    00123   { -1, "Unknown code", "The description of this code is unknown to libOfx"}
    00124 };
    00125
    00127
    00130 const ErrorMsg find_error_msg(int param_code)
    00131 {
    00132   ErrorMsg return_val;
    00133   int i;
    00134   bool code_found = false;
    00135
    00136   for (i = 0; i < 2000 && (code_found == false); i++)
    00137   {
    00138     if ((error_msgs_list[i].code == param_code) || (error_msgs_list[i].code == -1))
    00139     {
    00140       return_val = error_msgs_list[i];
    00141       code_found = true;
    00142     }
    00143   }
    00144   return return_val;
    00145 };
    00146
    00147 #endif