Skip to content

Method not allowed missing error message? #61

Open
@tucker01

Description

@tucker01

Maybe I'm missing something, but I removed any custom exception handlers in favor of what is being done in the commons jar:

https://github.com/zowe/sample-spring-boot-api-service/blob/master/zowe-rest-api-commons-spring/src/main/java/org/zowe/commons/spring/CustomRestExceptionHandler.java

For "403" I get the following response:

{
    "messages": [
        {
            "messageType": "ERROR",
            "messageNumber": "ZWEAS403",
            "messageContent": "The user is not authorized to the target resource: Access is denied",
            "messageKey": "org.zowe.commons.rest.forbidden",
            "messageInstanceId": "11a3da12-4895-42b5-81b1-e8e5e092c88d"
        }
    ]
}

For "405" I get no payload response? For us, its really not a big deal to have a message in the response body, the HTTP status is enough, but just wanted to check if this is expected behavior?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions