Skip to content

Commit

Permalink
fix: catch a greater subset of errors to throw to the user
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Nov 4, 2020
1 parent 8290ac8 commit eed7c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/socket/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const actions: ActionTree<SocketState, RootState> = {
* Another case might be during a klippy disconnect.
*/
async onSocketError ({ commit }, payload) {
if (payload.code === 400) {
if (payload.code >= 400 && payload.code < 500) {
// clear any associated waits.
if (payload.__request__ && payload.__request__.wait) {
commit('removeWait', payload.__request__.wait)
Expand Down

0 comments on commit eed7c71

Please sign in to comment.