vuetable-2-tutorial icon indicating copy to clipboard operation
vuetable-2-tutorial copied to clipboard

How to capture the failed API response in vuetable-2?

Open infotokabil opened this issue 7 years ago • 1 comments

Hi,

I am calling one API endpoint to get the data and in some scenarios that particular API endpoint may not be available or it may return the GatewayTimeout error as the response.

How to capture this error response?

Regards, Kabilan S

infotokabil avatar Sep 18 '17 09:09 infotokabil

You can listen to vuetable:load-error event.

<template>
  <vuetable 
    @vuetable:load-error="handleLoadError"
  ></vuetable>
</template>
<script>
  //...
  methods: {
    handleLoadError(response) {
      //...
    }
  }
</script>

ratiw avatar Sep 18 '17 12:09 ratiw