Skip to content

Commit

Permalink
Merge pull request #97 from ValentinTyhonov/temp
Browse files Browse the repository at this point in the history
Added more information in error messages for generate service
  • Loading branch information
ValentinTyhonov authored Mar 14, 2018
2 parents a1b09ab + 73a5556 commit 225d1f9
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

## 0.9.7
- Added more information in error messages for generate service
- Uplifted semantics version to 0.4.0

## 0.9.6
- Added swagger for generate service
- Added more verifications for generate service
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# eiffel-remrem-generate
# Eiffel REMReM Generate

[![Build Status](https://travis-ci.org/Ericsson/eiffel-remrem-generate.svg?branch=master)](https://travis-ci.org/Ericsson/eiffel-remrem-generate)
[![Coverage Status](https://coveralls.io/repos/github/Ericsson/eiffel-remrem-generate/badge.svg?branch=master)](https://coveralls.io/github/Ericsson/eiffel-remrem-generate?branch=master)
[![](https://jitpack.io/v/Ericsson/eiffel-remrem-generate.svg)](https://jitpack.io/#Ericsson/eiffel-remrem-generate)

## Documentation
Further documentation is provided at the following link: [http://ericsson.github.io/eiffel-remrem-generate/](http://ericsson.github.io/eiffel-remrem-generate/).

__IMPORTANT NOTICE:__ The contents of this repository currectly reflect a __DRAFT__. The Eiffel framework has been used in production within Ericsson for several years to great effect; what is presented here is a revision and evolution of that framework - an evolution that is currently ongoing. In other words, anything in this repository should be regarded as tentative and subject to change. It is published here to allow early access and trial and to solicit early feedback.
__IMPORTANT NOTICE:__ The contents of this repository currently reflect a __DRAFT__. The Eiffel framework has been used in production within Ericsson for several years to great effect; what is presented here is a revision and evolution of that framework - an evolution that is currently ongoing. In other words, anything in this repository should be regarded as tentative and subject to change. It is published here to allow early access and trial and to solicit early feedback.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ subprojects {
targetCompatibility = 1.8

//Latest version for generate
version = "0.9.6"
version = "0.9.7"

repositories {
mavenCentral()
Expand All @@ -64,7 +64,7 @@ subprojects {
dependencies {
//Injectable Message Library and its Implementation
compile("com.github.Ericsson:eiffel-remrem-shared:0.3.5")
compile("com.github.Ericsson:eiffel-remrem-semantics:0.3.8")
compile("com.github.Ericsson:eiffel-remrem-semantics:0.4.0")
compile("com.github.Ericsson:eiffel-remrem-protocol-interface:0.0.7")

//Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class EiffelRemremControllerIntegrationTest {
private String activityFinishedDuplicateKeysFileName = "ActivityFinishedEventDuplicatedKeys.json";
private String activityFinishedDuplicateKeysBody;

private String version = "1.0.0";
private String version = "1.1.0";

private String credentials = "Basic " + Base64.getEncoder().encodeToString("user:secret".getBytes());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"msgParams": {
"meta": {
"type": "EiffelActivityFinishedEvent",
"version": "1.0.0",
"version": "1.1.0",
"tags": [
"tag1",
"tag2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"msgParams": {
"meta": {
"type": "EiffelActivityFinishedEvent",
"version": "1.0.0",
"version": "1.1.0",
"tags": [
"tag1",
"tag2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"msgParams": {
"meta": {
"type": "EiffelArtifactPublishedEvent",
"version": "1.0.0",
"version": "1.1.0",
"tags": [
"tag1",
"tag2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@

public final class RemremGenerateServiceConstants {

public static final String NO_SERVICE_ERROR = "{\"message\":\"No protocol service has been found registered.\"}";
public static final String NO_TEMPLATE_ERROR = "{\"message\":\"Requested template is not available.\"}";
public static final String INTERNAL_SERVER_ERROR = "{\"message\":\"Internal server error.\"}";
public static final String NO_SERVICE_ERROR = "{\"status_code\": 503, \"result\": \"FAIL\", "
+ "\"message\":\"No protocol service has been found registered\"}";

public static final String NO_TEMPLATE_ERROR = "{\"status_code\": 404, \"result\": \"FAIL\", "
+ "\"message\":\"Requested template is not available\"}";

public static final String INTERNAL_SERVER_ERROR = "{\"status_code\": 500, \"result\": \"FAIL\", "
+ "\"message\":\"Internal server error\"}";

public static final String JSON_ERROR_MESSAGE_FIELD = "message";

public static final String DOCUMENTATION_URL = "http://ericsson.github.io/eiffel-remrem-generate/index.html";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public ResponseEntity<?> generate(@ApiParam(value = "message protocol", required
HttpStatus.SERVICE_UNAVAILABLE);
}
} catch (Exception e) {
return new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);
return new ResponseEntity<>(parser.parse(RemremGenerateServiceConstants.INTERNAL_SERVER_ERROR), HttpStatus.INTERNAL_SERVER_ERROR);
}
}

Expand Down

0 comments on commit 225d1f9

Please sign in to comment.