Chapter 6: Using HTML and XHTML to Format Web Pages

5.5 Error Codes for XML

The error code returned in the XML result is found in the element <ERRORCODE>, one level down from the root element in the XML document, whether you web publish XML or use export and import of XML. This number corresponds to the FileMaker Pro error codes found in Appendix B of the FileMaker Unlimited Administrator's Guide or in the Help topic "Status (CurrentError) function." Not all the codes are given in Table 5.6 but those specifically found in web publishing or XML export and import with FileMaker Pro. You may also receive errors in a dialog from the XML parser and XSL processor when you export and import XML.

Table 5.6: Specific error codes

Code

Explanation

0

This means no error. You want this to be your result.

4

"Command is unknown" is a catchall error. Check your web publishing setup first, then look for spelling errors in database names, layout names, etc.

5

"Command is invalid" can mean many things. A common error when web publishing, error 5 can be the result of an incorrect password or the database is not open.

101

"Record is missing" may be returned if a particular -recid does not exist in a -find or -edit request.

102

"Field is missing" is also a common web publishing error. Especially found if the field called in a CDML -format page or in a stylesheet is not on the layout. Related fields only need to be on a layout once and not necessarily in a portal for web publishing.

104

"Script is missing" may let you know that you have misspelled a -script name when web publishing.

105

"Layout is missing" could be returned if you specify a layout (-lay) that is spelled incorrectly. The layout is not used with XML import or export.

301

"Record is in use by another user" is a rare error when web publishing your database unless you also allow users to access the same files on a network.

306

"Record modification ID does not match" will be returned it you are trying to -edit a record and use the MODID attribute to prevent overwriting another user's changes. This is similar to error 301, except the web user gets the data in a stateless environment. This is the only way to verify the change correctly. This error is no longer listed in FileMaker Pro 6 Help.

400

"Find criteria is empty" may not be an error that you see, as a null or empty value is acceptable in a CGI request. You may simply get no results returned with a -find, -findall, or -findany action.

401

"No records match the request" is the error you may get if the find criteria are empty or no results are returned.

409

The "Import order is invalid" error may occur if you have changed field names or the fields in your scripted import.

410

"Export order is invalid." As with error 409, this most likely will occur if the fields have changed since the scripted export was created.

411

"Cannot perform delete because related records cannot be deleted" is an error that may be returned when you use the -delete action in an HTTP request if the relationship allows deleting, but the related records have a password disallowing deletion.

500–511

These are field validation errors and may not occur if you create records through an HTTP request or import XML.

700

"File is of the wrong file type for import." You can import XML only with the FMPXMLRESULT grammar. You probably will get a dialog rather than see this error in any XML.

714

"Password privileges do not allow the operation" error may return a browser dialog rather than the error code when you web publish.

717

"There is not enough XML/XSL information to proceed with the import or export." You may receive this generic error code and you may also see a dialog with specific information about the error in the XML or XSL documents.

718

"Error in parsing XML file (from Xerces)." If the XML for import is not in the proper FMPXMLRESULT grammar, the Xerces parser cannot continue.

719

"Error in transforming XML using XSL (from Xalan)." You may also see a dialog specifiying the error in the XSL document and where it occurs (line number). These dialogs may help you determine the necessary changes to your XSL document.

720

"Error when exporting; intended document format does not support repeating fields" may be an error that is not seen with XML export or web publishing with XML. FileMaker Pro will display the element <COL> with a <DATA> element for all the repeats of a field, regardless of the number of repeats shown on a layout or the last repeat with contents.

721

"Unknown error occurred in the parser or the transformer" is a generic error, but you may also get more information in a dialog.

800

"Unable to create file on disk" may be the error you get when you try to export and have insufficient disk space, for example.

950

"Adding repeating related fields is not supported" is an error in design and may not show in the web-published results.

951

"An unexpected error occurred" is very generic and difficult to pinpoint. The error could be in the HTTP request, in the display of the results, or in the sharing of the database.

971

"The user name is invalid" may be returned if the incorrect user ID is entered in the browser login or if the user name for the database is not set correctly.

972

"The password is invalid" may be shown in a browser dialog rather than returned as an error code.

973

"The database is invalid" may be the error code returned if the database has not been set to sharing with Web Companion.

974

"Permission denied" may be returned if the login fails or the CMDL -format pages are not available.

975

"The field has restricted access" may be the error code shown when the field on a layout has restrictions set in the Password dialog or the record level prevents creation, modification, or deletion of the field's contents.

976

"Security is disabled" may be returned if the configuration for Web Companion has been changed.

977

"Invalid client IP address" is the error presented if you have restricted the access to a range of IP addresses in the configuration for Web Companion.

978

"The number of allowed guests has been exceeded." This error is returned if FileMaker Pro Unlimited is not used and more than 10 unique IP addresses make HTTP requests over a 12-hour period.

5.51 JavaScript Errors

In addition to the FileMaker Pro errors, Web Companion may return these server errors. You may get a page with the error listed rather than returned in your XML results.

Table 5.7: JavaScript error codes

Code

Explanation

OK

No error.

Bad Request

The server could not process your request due to a syntax error.

403A Forbidden

You do not have authorization to access this server.

403B User Limit Exceeded

The maximum number of licensed users are connected. Try again later.

Not Found

The requested URL "xyz" was not found on this server. (This is the same as web server error "File not found.")

Internal Server Error

An internal server error has occurred.

Not Implemented

The server does not support the functionality required to fulfill this request.

HTTP Version Not Supported

The server does not support the HTTP protocol version that was used in the request message.

When encountering errors, check the error code list first and carefully check the request made. The errorcode element results can be used in a stylesheet to return the error message rather than a cryptic code.



Filemaker Pro 6 Developer's Guide to XML(s)XSL
FileMaker Pro 6 Developers Guide to XML/XSL (Wordware Library for FileMaker)
ISBN: 155622043X
EAN: 2147483647
Year: 2003
Pages: 100
Authors: Beverly Voth

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net