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

Unsupported http method for all resources - Fix http status code to 405 #1331

Closed
22 tasks done
amarmodus opened this issue May 6, 2020 · 2 comments
Closed
22 tasks done
Assignees
Labels
oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story
Milestone

Comments

@amarmodus
Copy link

amarmodus commented May 6, 2020

Summary:
When calling unsupported http method across services, the http status code of 404 is used.

eg. DELETE/POST /authorizations - this can give 405 status code as it is unsupported HTTP method

Severity:
Low

Priority:
Medium

Expected Behavior
http status of 405 - unsupported HTTP method for the request was used

Steps to Reproduce

 curl --location --request DELETE 'http://dev1-transaction-requests-service.mojaloop.live/authorizations/5851581a-5e75-4622-9e2e-38bd9b48c166?authenticationType=OTP&retriesLeft=2&amount=102&currency=USD' \
--header 'Accept: application/vnd.interoperability.transactionRequests+json;version=1' \
--header 'Content-Type: application/vnd.interoperability.transactionRequests+json;version=1.0' \
--header 'Date: Wed, 06 May 2020 09:09:14 GMT' \
--header 'fspiop-source: payerfsp' \
--header 'fspiop-destination: payeefsp' \
--header 'fspiop-signature: {"signature":"iU4GBXSfY8twZMj1zXX1CTe3LDO8Zvgui53icrriBxCUF_wltQmnjgWLWI4ZUEueVeOeTbDPBZazpBWYvBYpl5WJSUoXi14nVlangcsmu2vYkQUPmHtjOW-yb2ng6_aPfwd7oHLWrWzcsjTF-S4dW7GZRPHEbY_qCOhEwmmMOnE1FWF1OLvP0dM0r4y7FlnrZNhmuVIFhk_pMbEC44rtQmMFv4pm4EVGqmIm3eyXz0GkX8q_O1kGBoyIeV_P6RRcZ0nL6YUVMhPFSLJo6CIhL2zPm54Qdl2nVzDFWn_shVyV0Cl5vpcMJxJ--O_Zcbmpv6lxqDdygTC782Ob3CNMvg\",\"protectedHeader\":\"eyJhbGciOiJSUzI1NiIsIkZTUElPUC1VUkkiOiIvdHJhbnNmZXJzIiwiRlNQSU9QLUhUVFAtTWV0aG9kIjoiUE9TVCIsIkZTUElPUC1Tb3VyY2UiOiJPTUwiLCJGU1BJT1AtRGVzdGluYXRpb24iOiJNVE5Nb2JpbGVNb25leSIsIkRhdGUiOiIifQ"}' \
--header 'fspiop-uri: /transactionRequests' \
--header 'fspiop-http-method: DELETE'

Specifications

  • Component (if known):
  • Version: Helm 9.2.0
  • Platform:
  • Subsystem: authorizations (across services)
  • Type of testing: Manual
  • Bug found/raised by:@amarmodus

Tasks:

  • Make changes to SDK project and create release (add new 405 error)
  • Make changes to error handler project and create release (implement error code)
  • Update dependencies for central-event-processor
  • Update dependencies for account-lookup-service
  • Update dependencies or central-ledger (was already upgraded)
  • Update dependencies for ml-api-adapter
  • Update dependencies or quoting-service
  • Update dependencies for simulator (found bug Simulator has invalid fulfilment created for transfers POST #1415)
  • Update dependencies for transaction-requests-service
  • Update dependencies for central-settlement
  • Update dependencies or bulk-api-adapter

PRs:

Notes:

  • Severity when opened:
  • Priority when opened:
@amarmodus amarmodus added the bug label May 6, 2020
@elnyry-sam-k elnyry-sam-k added story and removed bug labels May 6, 2020
@elnyry-sam-k
Copy link
Member

Thanks Amar. I'm marking this as a feature request / story and not as a bug, since this wasn't ever implemented / prioritized..

@aenns aenns self-assigned this May 12, 2020
@aenns
Copy link

aenns commented May 19, 2020

@elnyry @rmothilal @mdebarros
Talked to Rajiv about this, and we're thinking to make an extension to handle it, similar to what's done in this 404 handler: https://hapi.dev/tutorials/routing/?lang=en_US#-404-handling
Let's discuss this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it story
Projects
None yet
Development

No branches or pull requests

3 participants