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

fix that non-successful message responses were not displayed in ACE editor #1810

Merged
merged 2 commits into from
Nov 25, 2023

Conversation

thjaeckle
Copy link
Member

  • only successful responses were displayed
  • however, messages might e.g. be answered with a 400 (bad request) and useful information as response

…ditor

* only successful responses were displayed
* however, messages might e.g. be answered with a 400 (bad request) and useful information as response
@thjaeckle thjaeckle added bug UI Issues related to the Ditto explorer UI labels Nov 21, 2023
@thjaeckle thjaeckle added this to the 3.4.2 milestone Nov 21, 2023
@thjaeckle thjaeckle self-assigned this Nov 21, 2023
@thjaeckle thjaeckle marked this pull request as ready for review November 21, 2023 19:51
@thjaeckle
Copy link
Member Author

@thfries I noticed that only successful message responses were displayed in the "response" ace editor
We use e.g. 400 "bad request" for validation errors and it would be really helpful to display such responses.

Could you please have a short look on the improvement/fix?

I also thought that displaying the status code might also be helpful, but had no good idea to add it to the current layout.

@thfries
Copy link
Contributor

thfries commented Nov 23, 2023

Hi @thjaeckle, I am missing the usual error toast now that is popping up in case of errors but I did not find a way to show it in addition to filling the response editor.

Other than that LGTM👍

I started working on having a separate field for the status similar like on the piggypack commands. But there is no easy way without some changes on the layout. Can be added later.

@thjaeckle
Copy link
Member Author

Thanks, will look into the toasts for other errors ..

* display error toast also for message responses with "failed" response code
* but still display the response as well in the messages response ace editor
* still show JSON errors which are not formatted as "ditto error" (containing at least status and message)

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
@thjaeckle
Copy link
Member Author

@thfries I now additionally show the "error toast" and improved that, displaying also errors which are not in "Ditto error format".

@thfries
Copy link
Contributor

thfries commented Nov 25, 2023

Nice! I like it. Thank you!

@thjaeckle thjaeckle merged commit 1b081a9 into master Nov 25, 2023
3 checks passed
@thjaeckle thjaeckle deleted the bugfix/show-message-response-for-non-2xx branch November 25, 2023 14:07
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug UI Issues related to the Ditto explorer UI
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants