Skip to content

API Response then(response) not equal catch(response) #122

Description

@mean-cj

Hello

I think plugin-axios response on catch() and then() same format is better
because then, catch inside method can be access this.model , this.entities

now

  • api response on then(response) format is response.response.data
  • api response on catch(response) format is response.data

catch() to same format as then() is ok.
or then response only data is ok.

return this.post('').then((response) => { console.log(response) })
2020-05-25_140219

return this.post('').catch((response) => { console.log(response) })
2020-05-25_140310

What are your thoughts on this matter?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions