Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method not allowed missing error message? #61

Open
tucker01 opened this issue Oct 21, 2019 · 9 comments
Open

Method not allowed missing error message? #61

tucker01 opened this issue Oct 21, 2019 · 9 comments

Comments

@tucker01
Copy link

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?

@plavjanik
Copy link
Contributor

This is a bug for sure. Thank you for reporting it.

@dkelosky
Copy link
Contributor

I was trying to reproduce via the pure sample but cannot. I used PUT on the /api/v1/greeting endpoint:

image

Maybe we can look offline to see what else might be going on?

@tucker01
Copy link
Author

OK sounds good. What version of the Commons Jar are you at?

@dkelosky
Copy link
Contributor

I built commons from source. I'll retry my test with the last published commons jar.

@tucker01
Copy link
Author

OK we're at 'org.zowe:zowe-rest-api-commons-spring:0.4.2'

@dkelosky
Copy link
Contributor

org.zowe:zowe-rest-api-commons-spring:0.5.1 seems to give the proper payload as well. Can you try on this version?

Thanks,

@plavjanik
Copy link
Contributor

#56 that is in v0.5.1 can be related

@plavjanik
Copy link
Contributor

We should create a bug template that asks for a version and full specification of the request.

@plavjanik plavjanik added this to Needs triage in Defects Nov 16, 2019
@github-actions
Copy link

This issue has not been updated in a long time.

@github-actions github-actions bot closed this as completed Jan 3, 2020
Defects automation moved this from Needs triage to Closed Jan 3, 2020
@plavjanik plavjanik reopened this Feb 3, 2020
Defects automation moved this from Closed to Needs triage Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Defects
  
Needs triage
Development

No branches or pull requests

3 participants