update view if RestClient responds with HTTP 500
Added `sum` function so reduce function that use it work correctly.