Skip to content

Commit

Permalink
Feature/#1243 #1245 incorrect http and status code (#250)
Browse files Browse the repository at this point in the history
* Initial Commit.

* Upload domain/participant test.

* Upload domain/participant test.

* fixes for getParticipantsByTypeId test failing. now functioning properly
removed validator file as it isn't used may be required in MSISDN oracle as it validated mobile number formats

* Checking in testing code.

* removal of vscode config

* updated gitignore

* fixes for stubbing issues

* fix for bug mojaloop/project#797
Fixes for sonarQube code sanity i.e removing function names that aren't needed, changing let to const, reordering functions in file
Changed unique constraint on oracleEndpoint which is now working correctly

* fix for only retrieving default entries
return undefined for currency when it is not available

* fix for returning null for valid oracle lookup

* correct database port

* removal of isOracle for header validation

* fix for incorrect endpoint being requested for callback response

* updated with pre-commit to manage dependencies

* Updated versions of ALS dependencies and updated standard changes

* incorrect port for database being set

* changes for invalid error code being returned

* updated version and error thrown

Co-authored-by: HenkKodde <36304517+HenkKodde@users.noreply.github.com>
  • Loading branch information
rmothilal and HenkKodde authored Feb 27, 2020
1 parent 5ce37f8 commit 2ca3959
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 15 deletions.
12 changes: 1 addition & 11 deletions audit-resolve.json
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
{
"decisions": {
"1482|@hapi/hapi": {
"decision": "ignore",
"madeAt": 1582124461246,
"expiresAt": 1582729246881
}
},
"rules": {},
"version": 1
}
{}
74 changes: 73 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "account-lookup-service",
"description": "Account Lookup Service is used to validate Party and Participant lookups",
"version": "9.2.2",
"version": "9.2.3",
"license": "Apache-2.0",
"author": "ModusBox",
"contributors": [
Expand Down Expand Up @@ -96,6 +96,7 @@
"devDependencies": {
"@types/jest": "25.1.3",
"eslint": "6.8.0",
"eslint-plugin-jest": "23.8.0",
"get-port": "5.1.1",
"jest": "25.1.0",
"jest-junit": "10.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'use strict'

const Hapi = require('@hapi/hapi')
const Boom = require('@hapi/boom')
const HapiOpenAPI = require('hapi-openapi')
const Path = require('path')
const Db = require('./lib/db')
Expand Down Expand Up @@ -70,7 +71,7 @@ const createServer = async (port, isApi) => {
validate: {
options: ErrorHandler.validateRoutes(),
failAction: async (request, h, err) => {
throw ErrorHandler.Factory.reformatFSPIOPError(err)
throw Boom.boomify(err)
}
},
payload: {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/handlers/participants.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('/participants', () => {
const response = await server.inject(options)

// Assert
expect(response.statusCode).toBe(500)
expect(response.statusCode).toBe(400)
await server.stop()
})
})

0 comments on commit 2ca3959

Please sign in to comment.