Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

official error message is sometimes useful #97

@xixixi2000

Description

@xixixi2000

diff api.go api.go.orig
61,77d60
<
< if resp.StatusCode != 200 {
< // Try read response body as JSON
< var error_response map[string]interface{}
< err = json.NewDecoder(resp.Body).Decode(&error_response)
< if err != nil {
< c.AbortWithStatusJSON(resp.StatusCode, err)
< return
< }
< c.AbortWithStatusJSON(resp.StatusCode, gin.H{
< "error": error_response,
< })
<
< return
< }
<
< /*
103d85
< */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions