mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 19:23:55 +00:00
Merge pull request #1103 from transloadit/chore/tl-tweaks
transloadit: Error tweaks
This commit is contained in:
commit
d598efc044
2 changed files with 6 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ function validateParams (params) {
|
|||
|
||||
if (!params.auth || !params.auth.key) {
|
||||
throw new Error('Transloadit: The `params.auth.key` option is required. ' +
|
||||
'You can find your Transloadit API key at https://transloadit.com/accounts/credentials.')
|
||||
'You can find your Transloadit API key at https://transloadit.com/account/api-settings.')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,13 @@ module.exports = class Transloadit extends Plugin {
|
|||
this._onRestored = this._onRestored.bind(this)
|
||||
this._getPersistentData = this._getPersistentData.bind(this)
|
||||
|
||||
const hasCustomAssemblyOptions = this.opts.getAssemblyOptions !== defaultOptions.getAssemblyOptions
|
||||
if (this.opts.params) {
|
||||
AssemblyOptions.validateParams(this.opts.params)
|
||||
} else if (!hasCustomAssemblyOptions) {
|
||||
// Throw the same error that we'd throw if the `params` returned from a
|
||||
// `getAssemblyOptions()` function is null.
|
||||
AssemblyOptions.validateParams(null)
|
||||
}
|
||||
|
||||
this.client = new Client({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue