diff --git a/client/homebrew/pages/archivePage/archivePage.jsx b/client/homebrew/pages/archivePage/archivePage.jsx index 90d9104a0..4dc921fd3 100644 --- a/client/homebrew/pages/archivePage/archivePage.jsx +++ b/client/homebrew/pages/archivePage/archivePage.jsx @@ -263,24 +263,19 @@ const ArchivePage = createClass({ if(title === '') {return (

Whenever you want, just start typing...

);} - if (!brewCollection || brewCollection.length === 0) { - return ( -
-

No brews found

-
- ); - }; + if (error) { console.log('render Error: ', error); let errorMessage; switch (error.errorCode) { case '404': - errorMessage = "We didn't find any brew"; + errorMessage = "404 - We didn't find any brew"; break; case '503': - errorMessage = 'Your search is not specific enough. Too many brews meet this criteria for us to display them.'; + errorMessage = ' 503 - Your search is not specific enough. Too many brews meet this criteria for us to display them.'; break; case '500': + errorMessage = "500 - We don't know what happened." default: errorMessage = 'An unexpected error occurred'; } @@ -291,6 +286,15 @@ const ArchivePage = createClass({ ); }; + + if (!brewCollection || brewCollection.length === 0) { + return ( +
+

No brews found

+
+ ); + }; +