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

editor: improve error message #414

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Conversation

zannkukai
Copy link
Contributor

Rather than a generic error message, try to use the message returned by
backend when an error is detected on the editor form.

Co-authored-by: Renaud Michotte renaud.michotte@gmail.com

How to test?

image

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai added the f: editor Concerns editor based on JSON schema AND custom editor label Jul 1, 2021
@zannkukai zannkukai self-assigned this Jul 1, 2021
@@ -359,34 +359,26 @@ export class RecordService {
* @return throwError
*/
private _handleError(error: HttpErrorResponse): Observable<Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

The return value is not an observable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

throwError return an Observable of Error. This is right ;-)

@iGormilhit iGormilhit changed the title editor: display better error message editor: improve error message Jul 1, 2021
@iGormilhit iGormilhit added this to the v.1.4.0 milestone Jul 1, 2021
Copy link

@iGormilhit iGormilhit left a comment

Choose a reason for hiding this comment

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

Commit message title proposition: editor: improve error message

Rather than a generic error message, try to use the message returned by
backend when an error is detected on the editor form.

Co-authored-by: Renaud Michotte <renaud.michotte@gmail.com>
@zannkukai zannkukai force-pushed the zan-better-error-msg branch from 8de808e to 4608041 Compare July 2, 2021 14:38
@zannkukai zannkukai requested a review from iGormilhit July 2, 2021 14:38
@zannkukai zannkukai merged commit b208816 into rero:dev Jul 5, 2021
@zannkukai zannkukai deleted the zan-better-error-msg branch July 5, 2021 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: editor Concerns editor based on JSON schema AND custom editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants