diff --git a/src/exercise/02.js b/src/exercise/02.js index 57990f56..eae9dafc 100644 --- a/src/exercise/02.js +++ b/src/exercise/02.js @@ -84,15 +84,12 @@ function PokemonInfo({pokemonName}) { } else if (status === 'pending') { return } else if (status === 'rejected') { - return ( -
- There was an error:{' '} -
{error.message}
-
- ) + throw error } else if (status === 'resolved') { return } + + throw new Error('This should be impossible') } function App() {