attlaz-client 1.5.9 → 1.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ export declare class HttpClient {
7
7
  static HTTP_NOTFOUND: number;
8
8
  static HTTP_NOT_ALLOWED: number;
9
9
  static HTTP_UNPROCESSABLE_ENTITY: number;
10
+ static HTTP_INTERNAL_SERVER_ERROR: number;
10
11
  static HTTP_UNAVAILABLE: number;
11
12
  static get(url: string, requestData?: any): Promise<any>;
12
13
  static request(request: HttpClientRequest): Promise<any>;
@@ -99,4 +99,5 @@ HttpClient.HTTP_FORBIDDEN = 403;
99
99
  HttpClient.HTTP_NOTFOUND = 404;
100
100
  HttpClient.HTTP_NOT_ALLOWED = 405;
101
101
  HttpClient.HTTP_UNPROCESSABLE_ENTITY = 422;
102
+ HttpClient.HTTP_INTERNAL_SERVER_ERROR = 500;
102
103
  HttpClient.HTTP_UNAVAILABLE = 503;
@@ -64,7 +64,7 @@ class ClientError {
64
64
  return new ClientError('Unprocessable Entity', HttpClient_1.HttpClient.HTTP_UNPROCESSABLE_ENTITY);
65
65
  break;
66
66
  case 500:
67
- return new ClientError('Internal Server Error', HttpClient_1.HttpClient.HTTP_NOTFOUND);
67
+ return new ClientError('Internal Server Error', HttpClient_1.HttpClient.HTTP_INTERNAL_SERVER_ERROR);
68
68
  break;
69
69
  case 503:
70
70
  return new ClientError('Service not available', HttpClient_1.HttpClient.HTTP_UNAVAILABLE);
@@ -11,7 +11,7 @@ class TaskExecutionSummary extends TaskExecution_1.TaskExecution {
11
11
  }
12
12
  static parse(rawTaskExecutionSummary) {
13
13
  let taskExecutionSummary = TaskExecution_1.TaskExecution.parse(rawTaskExecutionSummary);
14
- if (rawTaskExecutionSummary.time !== null && rawTaskExecutionSummary.time !== undefined) {
14
+ if (rawTaskExecutionSummary.time === null || rawTaskExecutionSummary.time === undefined) {
15
15
  throw new Error('Task execution time cannot be empty');
16
16
  }
17
17
  taskExecutionSummary.time = Utils_1.Utils.parseRawDate(rawTaskExecutionSummary.time);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",