Skip to content

Conversation

zvikfir
Copy link

@zvikfir zvikfir commented Apr 12, 2023

Including a picture that shows the Discord message type works.

image

relates to appwrite/appwrite#3959

@stnguyen90 stnguyen90 self-requested a review April 30, 2023 15:12
Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! 🤯 We left some comments during the review, please check them out.

Comment on lines +44 to +49
} catch (IllegalArgumentException exception) {
return res.json(Map.of(
"success", false,
"message", exception.getMessage()
));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't catch an exception if the API call fails due to a bad API key. Instead, the output is:

{
  "stdout": "",
  "stderr": "io.openruntimes.java.Wrapper$MessageSendingFailedException: Request failed: Forbidden\n\tat io.openruntimes.java.Wrapper.sendEmailMessage(Wrapper.java:109)\n\tat io.openruntimes.java.Wrapper.main(Wrapper.java:45)\n\tat io.openruntimes.java.Server.execute(Server.java:43)\n\tat org.rapidoid.http.handler.optimized.DelegatingParamsAwareReqRespHandler.handleReq(DelegatingParamsAwareReqRespHandler.java:49)\n\tat org.rapidoid.http.handler.AbstractHttpHandlerDecorator.handleReqAndPostProcess(AbstractHttpHandlerDecorator.java:48)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator$3.invokeNext(HttpManagedHandlerDecorator.java:161)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator$3.invoke(HttpManagedHandlerDecorator.java:121)\n\tat org.rapidoid.http.handler.HttpAuthWrapper.wrap(HttpAuthWrapper.java:70)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator.wrap(HttpManagedHandlerDecorator.java:185)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator.handleWithWrappers(HttpManagedHandlerDecorator.java:100)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator.access$200(HttpManagedHandlerDecorator.java:39)\n\tat org.rapidoid.http.handler.HttpManagedHandlerDecorator$2.run(HttpManagedHandlerDecorator.java:83)\n\tat org.rapidoid.job.PredefinedContextJobWrapper.run(PredefinedContextJobWrapper.java:56)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants