We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8dc3ac commit 9a62200Copy full SHA for 9a62200
src/backend/src/api/APIError.js
@@ -482,6 +482,10 @@ module.exports = class APIError {
482
status: 422,
483
message: 'This share can not be applied to this user.',
484
},
485
+ 'no_origin_for_app': {
486
+ status: 400,
487
+ message: 'Puter apps must have a valid URL.'
488
+ },
489
490
// Chat
491
// TODO: specifying these errors here might be a violation
src/backend/src/services/auth/AuthService.js
@@ -442,6 +442,9 @@ class AuthService extends BaseService {
442
443
async app_uid_from_origin (origin) {
444
origin = this._origin_from_url(origin);
445
+ if ( origin === null ) {
446
+ throw APIError.create('no_origin_for_app');
447
+ }
448
return await this._app_uid_from_origin(origin);
449
}
450
0 commit comments