webcane / readme-app

web application which holds and manages articles to read
0 stars 0 forks source link

[FE] show notifications #37

Open webcane opened 3 years ago

webcane commented 3 years ago

show error notification in case of editor error. use https://www.npmjs.com/package/ngx-toastr

webcane commented 3 years ago

add styles avoid duplicates add profile customization (delay)

webcane commented 3 years ago

https://getbootstrap.com/docs/5.0/components/toasts/ https://www.npmjs.com/package/ngx-toastr https://blog.jscrambler.com/how-to-create-angular-toastr-notifications https://stackblitz.com/edit/ngx-toast-notifications?file=app%2Fapp.component.ts

webcane commented 3 years ago

it will be better to provide to front-end better error messages. example:

2021-05-02 21:28:02.274  WARN 3985 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23505
2021-05-02 21:28:02.302 ERROR 3985 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: duplicate key value violates unique constraint "uk_la4e9l2g2otn85r9ih4btnmi"
  Подробности: Key (url)=(http://a.ru) already exists.
2021-05-02 21:28:02.373  WARN 3985 --- [nio-8080-exec-2] cane.brothers.article.ArticleController  : Unable to add article ArticleForm(url=http://a.ru, title=q, preamble=null, tags=[TagForm(value=oop)]). could not execute statement; SQL [n/a]; constraint [uk_la4e9l2g2otn85r9ih4btnmi]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

Unable to publish article with same url.