Return 403 from permission error
This commit is contained in:
parent
b938bc7c52
commit
15f859d562
|
@ -84,6 +84,7 @@ interface ClientInformation {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://indieauth.spec.indieweb.org/#client-information-discovery
|
||||||
async function discoverClientInformation(httpRequestService: HttpRequestService, id: string): Promise<ClientInformation> {
|
async function discoverClientInformation(httpRequestService: HttpRequestService, id: string): Promise<ClientInformation> {
|
||||||
try {
|
try {
|
||||||
const res = await httpRequestService.send(id);
|
const res = await httpRequestService.send(id);
|
||||||
|
|
|
@ -553,8 +553,7 @@ describe('OAuth', () => {
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ text: 'test' }),
|
body: JSON.stringify({ text: 'test' }),
|
||||||
});
|
});
|
||||||
// XXX: PERMISSION_DENIED is not using kind: 'permission' and gives 400 instead of 403
|
assert.strictEqual(createResponse.status, 403);
|
||||||
assert.strictEqual(createResponse.status, 400);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue