Skip to content

wrong specs on fieldErrors #78

@duongphuhiep

Description

@duongphuhiep

the specs defined the "fieldErrors" as array

but the API returned an object (not array). Example

{
    "fieldErrors": {
        "registration.roles": [
            {
                "code": "[invalid]registration.roles",
                "message": "The role [employeee] does not exist in the application indicated by the [registration.applicationId] property."
            }
        ]
    },
    "generalErrors": []
}

I'm using FusionAuth version 1.58.2. The Request was as follows (I deliberately make mistake in the roles "employeee")

POST http://localhost:9011/api/user/registration

{
    "registration": {
        "applicationId": "5084fd6c-d334-4565-9ba6-a67b767c4eb6",
        "roles": [
            "employeee"
        ]
    },
    "user": {
        "email": "totochan@email.com",
        "fullName": "Toto Chan",
        "password": "MySuperPassword",
        "username": "totochan"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions