PhantomJS Exit Codes

PhantomJS extracts publishers' section mosaics for their Marfeel PWA (Progressive WebApp).

To identify any issues or controlled errors that arise from this extraction, Marfeel has the following set of exit codes to pinpoint the error that occurred.

// 3. fail loading page from arg[1]

Indicates that the page cannot be loaded where Phantom is trying to extract items. That is, the URL is not valid.

// 4. failinjectingWhiteCollar script

The page is loading correctly, however the whiteCollar being used is not found. 

// 5. no items found on loaded page

No items could be found on the page. 

// 7. Tenant whiteCollar script not present

The whiteCollar has a bad configuration.

// 8. Tenant whiteCollar script malformed

The whiteCollar is not configured correctly.

// 11. whiteCollar script failed to extract items

whiteCollar failed to extract and format items for Marfeelization.

// 12. MetadataProvider error

Extracting active MetadataProviders failed or, MetadataProviders were not added in the metadataProvider JS files.

// 13. Redirection response without redirectURL

Phantomjs is unable handle the redirection.

// 14. Client error response: 4xx

Error due to proxy or wrong mapping (in local).

// 15. Client error response: 5xx

Error due to proxy or wrong mapping (in local).

Error due to client server issues (in production).

// 16. Redirection loop encountered

The URL is a redirection loop, and will never end up having a valid 200 response.

// 17. Client timeout

Phantomjs could not retrieve the answer from the tenant because it took too long.

Error 255

Something unexpected that cannot be identified occurred.