diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-23 16:01:21 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-23 16:01:21 +0200 |
| commit | 5eaa3ffa4204d68ce2bb4c342c8042616e6d2c6c (patch) | |
| tree | 8ad72f730aa059380337b682518f540f7de9a51e /src | |
| parent | 1f8d51c5393ea2f413de4f3e05f77d360d096ff3 (diff) | |
| parent | a8ae9db5098ffead085986619f220d237eac12f0 (diff) | |
| download | DevHive-5eaa3ffa4204d68ce2bb4c342c8042616e6d2c6c.tar DevHive-5eaa3ffa4204d68ce2bb4c342c8042616e6d2c6c.tar.gz DevHive-5eaa3ffa4204d68ce2bb4c342c8042616e6d2c6c.zip | |
Merge branch 'dev' of github.com:Team-Kaleidoscope/DevHive into dev
Diffstat (limited to 'src')
3 files changed, 11 insertions, 2 deletions
diff --git a/src/DevHive.Angular/src/app/components/error-bar/error-bar.component.ts b/src/DevHive.Angular/src/app/components/error-bar/error-bar.component.ts index 40a13e7..c24448e 100644 --- a/src/DevHive.Angular/src/app/components/error-bar/error-bar.component.ts +++ b/src/DevHive.Angular/src/app/components/error-bar/error-bar.component.ts @@ -1,5 +1,6 @@ import {HttpErrorResponse} from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; +import {IApiError} from 'src/interfaces/api-error'; @Component({ selector: 'app-error-bar', @@ -16,7 +17,9 @@ export class ErrorBarComponent implements OnInit { } showError(error: HttpErrorResponse): void { - this.errorMsg = error.statusText; + const test: IApiError = { type: '', title: 'Error!', status: 0, traceId: '' }; + Object.assign(test, error.error); + this.errorMsg = test.title; } hideError(): void { diff --git a/src/DevHive.Angular/src/app/components/register/register.component.ts b/src/DevHive.Angular/src/app/components/register/register.component.ts index aeaa4d8..832d176 100644 --- a/src/DevHive.Angular/src/app/components/register/register.component.ts +++ b/src/DevHive.Angular/src/app/components/register/register.component.ts @@ -45,7 +45,7 @@ export class RegisterComponent implements OnInit { ]), }); - this.registerUserFormGroup.valueChanges.subscribe(console.log); + // this.registerUserFormGroup.valueChanges.subscribe(console.log); } onSubmit(): void { diff --git a/src/DevHive.Angular/src/interfaces/api-error.ts b/src/DevHive.Angular/src/interfaces/api-error.ts new file mode 100644 index 0000000..4dd68f3 --- /dev/null +++ b/src/DevHive.Angular/src/interfaces/api-error.ts @@ -0,0 +1,6 @@ +export interface IApiError { + type: string; + title: string; + status: number; + traceId: string; +} |
