• Robert Knight's avatar
    Make failed API calls reject with an Error · 7d870583
    Robert Knight authored
    Previously failed API calls from the `store` module were rejected with a
    { status, statusText, data, headers } response object.
    
    This had several problems:
    
     * This violated the convention that promises should be rejected with
       Error or Error-like objects, so callers could not rely on the result
       having a `message` property.
    
     * It was up to each of the callers to translate the result into
       a message suitable for display, which is likely to lead to
       inconsistency.
    
     * Testing the translation of different kinds of failures into
       messages was mixed up in the `<annotation>` component tests.
    
    This commit moves the translation of $http responses to `Error` objects
    into the API client (`store`) module and adds tests.
    7d870583
Name
Last commit
Last update
..
integration Loading commit data...
analytics-test.js Loading commit data...
annotation-fixtures.js Loading commit data...
annotation-mapper-test.js Loading commit data...
annotation-metadata-test.js Loading commit data...
annotation-ui-test.js Loading commit data...
auth-test.js Loading commit data...
bootstrap.js Loading commit data...
build-thread-test.js Loading commit data...
drafts-test.js Loading commit data...
fake-redux-store.js Loading commit data...
features-test.js Loading commit data...
form-respond-test.coffee Loading commit data...
frame-sync-test.js Loading commit data...
groups-test.js Loading commit data...
host-config-test.js Loading commit data...
host-test.coffee Loading commit data...
local-storage-test.coffee Loading commit data...
markdown-commands-test.js Loading commit data...
media-embedder-test.js Loading commit data...
oauth-auth-test.js Loading commit data...
permissions-test.coffee Loading commit data...
raven-test.js Loading commit data...
render-markdown-test.js Loading commit data...
retry-util-test.js Loading commit data...
root-thread-test.js Loading commit data...
search-client-test.js Loading commit data...
search-filter-test.coffee Loading commit data...
service-config-test.js Loading commit data...
service-url-test.js Loading commit data...
session-test.js Loading commit data...
store-test.js Loading commit data...
streamer-test.js Loading commit data...
tabs-test.js Loading commit data...
tags-test.coffee Loading commit data...
time-test.js Loading commit data...
unicode-test.coffee Loading commit data...
view-filter-test.coffee Loading commit data...
virtual-thread-list-test.js Loading commit data...
websocket-test.js Loading commit data...