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 but the body size is greater than 1KB. 

// 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. Fail loading request from page

When a page request a resource it fails

// 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.

// 18. Empty Body

We throw this error when the body of the section retrieved has less than 1KB.

// 19. Redirect found

Exit code thrown when a redirect is found. Only used on consumer profile by now.


Error 255

Something unexpected that cannot be identified occurred.