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
make identity-backfill pass on zuora errors as 400 #224
Conversation
Pull Request Test Coverage Report for Build 718
💛 - Coveralls |
Some endpoints are hit directly by end users, digital-subscription-expiry comes to mind but there might be others as well. I don't think this is the commonly expected behaviour and since this project is the default location for our future lambda based apis I would prefer not to do that. |
cef51fa
to
112ebc4
Compare
def toApiGatewayOp(action: String): ApiGatewayOp[A] = clientOp.toDisjunction.toApiGatewayOp { error => | ||
logger.error(s"Failed to $action: $error") | ||
badRequest(s"Failed to execute lambda - unable to $action") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are changing it only for identity backfill then I would also be ok with you returning the error description in a 500 if you think that suits it better.
I just didn't think we should do it globally for all apis
agree with patricio, if it's going to be a protected endpoint indefinitely then returning directly is OK 👍 otherwise it's risky. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I think error 500 would be better if it is not an actual bad request but I'll leave it up to you
When running scripts it's hard to tell what's happened on an internal server error.
I can't see any secrets returned on 500s. Is there a reason for hiding the message? Endusers don't hit any of this project's endpoints directly do they?
Edit: I've changed this to return 400s with error reasons on api client errors in Identity backfill.