summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/shared/api/logging.service.ts
blob: 85846946b6c795d27babedd6c77e90b7ca9c7176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class LoggingService {
  constructor(private http: HttpClient) {}

  jsError(url: string, message: string, stack: any) {
    const request = {
      url: url,
      message: message,
      stack: stack
    };
    return this.http.post('ui-api/logging/js-error', request);
  }
}