Skip to content

Commit 8b25a4a

Browse files
authored
Merge branch 'main' into fix/error-codes
2 parents ea22827 + fbcf3c2 commit 8b25a4a

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

doc/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ OpenWhisk credentials can also be read from environment variables `__OW_NAMESPAC
196196
| --- | --- | --- |
197197
| [config] | <code>object</code> | used to init the sdk |
198198
| [config.ow] | [<code>OpenWhiskCredentials</code>](#OpenWhiskCredentials) | [OpenWhiskCredentials](#OpenWhiskCredentials). Set those if you want to use ootb credentials to access the state management service. OpenWhisk namespace and auth can also be passed through environment variables: `__OW_NAMESPACE` and `__OW_API_KEY` |
199-
| [config.region] | <code>string</code> | optional region to use, accepted values: `amer` (default), `emea` |
199+
| [config.region] | <code>string</code> | optional region to use, accepted values: `amer` (default), `emea`, `apac` |
200200

201201
<a name="AdobeStateCredentials"></a>
202202

e2e/e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('e2e tests using OpenWhisk credentials (as env vars)', () => {
101101
expect({ name: expectedError.name, code: expectedError.code, message: expectedError.message, sdkDetails: expectedError.sdkDetails })
102102
.toEqual(expect.objectContaining({
103103
name: 'AdobeStateLibError',
104-
code: 'ERROR_BAD_CREDENTIALS'
104+
code: 'ERROR_UNAUTHORIZED'
105105
}))
106106
})
107107

lib/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const { AdobeState } = require('./AdobeState')
4242
* to use ootb credentials to access the state management service. OpenWhisk
4343
* namespace and auth can also be passed through environment variables:
4444
* `__OW_NAMESPACE` and `__OW_API_KEY`
45-
* @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`
45+
* @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`, `apac`
4646
* @returns {Promise<AdobeState>} An AdobeState instance
4747
*/
4848
async function init (config = {}) {

test/AdobeState.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ describe('private methods', () => {
719719
mockCLIEnv.mockReturnValue(env)
720720

721721
await expect(AdobeState.init({ ...fakeCredentials, region })).rejects
722-
.toThrow('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea')
722+
.toThrow(new Error('[AdobeStateLib:ERROR_BAD_ARGUMENT] /region must be equal to one of the allowed values: amer, emea, apac'))
723723
})
724724
})
725725

types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export type OpenWhiskCredentials = {
165165
* to use ootb credentials to access the state management service. OpenWhisk
166166
* namespace and auth can also be passed through environment variables:
167167
* `__OW_NAMESPACE` and `__OW_API_KEY`
168-
* @param [config.region] - optional region to use, accepted values: `amer` (default), `emea`
168+
* @param [config.region] - optional region to use, accepted values: `amer` (default), `emea`, `apac`
169169
* @returns An AdobeState instance
170170
*/
171171
export function init(config?: {

0 commit comments

Comments
 (0)