@junobuild/errors
Version:
A collection of predefined error constants and utilities for Juno applications.
5 lines (4 loc) • 7.57 kB
JavaScript
import { createRequire as topLevelCreateRequire } from 'module';
const require = topLevelCreateRequire(import.meta.url);
var r="juno.cdn.proposals.error.cannot_submit",e="juno.cdn.proposals.error.cannot_submit_invalid_status",R="juno.cdn.proposals.error.cannot_reject",t="juno.cdn.proposals.error.cannot_reject_invalid_status",O="juno.cdn.proposals.error.cannot_commit",n="juno.cdn.proposals.error.cannot_commit_invalid_status",E="juno.cdn.proposals.error.invalid_hash",N="juno.cdn.proposals.error.unknown_type",s="juno.cdn.proposals.error.empty_content_chunks",c="juno.cdn.proposals.error.no_content_chunks_at_index",T="juno.cdn.proposals.error.empty_assets",a="juno.cdn.proposals.error.cannot_delete_assets",A="juno.cdn.proposals.error.cannot_delete_assets_invalid_status",S="juno.cdn.proposals.error.next_id_convert",p="juno.cdn.proposals.error.next_id_overflow",C="juno.cdn.storage.error.cannot_insert_asset_unknown_reference_id",u="juno.cdn.storage.error.cannot_get_asset_unknown_reference_id",l="juno.cdn.storage.error.cannot_insert_asset_encoding_unknown_reference_id",U="juno.cdn.storage.error.no_proposal_found",L="juno.cdn.storage.error.invalid_releases_path",d="juno.cdn.storage.error.missing_releases_description",D="juno.cdn.storage.error.invalid_releases_description",i="juno.cdn.storage.error.invalid_collection";var x="juno.collections.error.modify_reserved_collection",j="juno.collections.error.reserved_name",J="juno.collections.error.reserved_collection",P="juno.collections.error.rate_config_enabled",m="juno.collections.error.prefix_deletion",M="juno.collections.error.not_empty",f="juno.collections.error.not_found",g="juno.collections.error.prefix_reserved";var F="juno.error.no_timestamp_provided",V="juno.error.timestamp_outdated_or_future",v="juno.error.no_version_provided",h="juno.error.version_outdated_or_future",H="juno.datastore.error.cannot_write",w="juno.datastore.error.cannot_read",W="juno.storage.error.upload_not_allowed",k="juno.storage.error.set_not_allowed",y="juno.storage.error.cannot_commit_invalid_collection",K="juno.storage.error.cannot_commit_batch",Y="juno.storage.error.asset_not_found",X="juno.storage.error.cannot_read_asset",b="juno.storage.error.upload_path_collection_prefix",B="juno.storage.error.reserved_asset",z="juno.storage.error.batch_not_found",Z="juno.storage.error.chunk_not_found",q="juno.storage.error.chunk_not_included_in_batch",Q="juno.storage.error.chunk_to_commit_not_found",$="juno.storage.error.asset_max_allowed_size",__="juno.auth.error.not_admin_controller",o_="juno.auth.error.invalid_origin",r_="juno.auth.error.not_write_controller",e_="juno.auth.error.not_controller",R_="juno.datastore.error.user.cannot_update",t_="juno.datastore.error.user.invalid_data",O_="juno.datastore.error.user.caller_key",n_="juno.datastore.error.user.key_no_principal",E_="juno.datastore.error.user.not_allowed",N_="juno.datastore.error.user.usage.change_limit_reached",s_="juno.datastore.error.user.usage.invalid_data";var T_="juno.error.controllers.max_number",a_="juno.error.controllers.anonymous_not_allowed",A_="juno.error.controllers.revoked_not_allowed",S_="juno.error.memory.stable_exceeded",p_="juno.error.memory.heap_exceeded",C_="juno.error.cycles.deposit_balance_low",u_="juno.error.cycles.deposit_failed",l_="juno.error.canister.create_failed",U_="juno.error.canister.install_code_failed",L_="juno.error.segment.stop_failed",d_="juno.error.segment.delete_failed",D_="juno.error.cmc.call_ledger_failed",i_="juno.error.cmc.ledger_transfer_failed",I_="juno.error.cmc.top_up_failed",x_="juno.error.cmc.call_create_canister_failed",j_="juno.error.cmc.create_canister_failed",J_="juno.error.cmc.install_code_failed",P_="juno.error.invalid_regex";var M_=({error:_,type:o})=>typeof _=="string"?_.includes(o):_ instanceof Error?_.message.includes(o):!1;export{o_ as JUNO_AUTH_ERROR_INVALID_ORIGIN,__ as JUNO_AUTH_ERROR_NOT_ADMIN_CONTROLLER,e_ as JUNO_AUTH_ERROR_NOT_CONTROLLER,r_ as JUNO_AUTH_ERROR_NOT_WRITE_CONTROLLER,O as JUNO_CDN_PROPOSALS_ERROR_CANNOT_COMMIT,n as JUNO_CDN_PROPOSALS_ERROR_CANNOT_COMMIT_INVALID_STATUS,a as JUNO_CDN_PROPOSALS_ERROR_CANNOT_DELETE_ASSETS,A as JUNO_CDN_PROPOSALS_ERROR_CANNOT_DELETE_ASSETS_INVALID_STATUS,R as JUNO_CDN_PROPOSALS_ERROR_CANNOT_REJECT,t as JUNO_CDN_PROPOSALS_ERROR_CANNOT_REJECT_INVALID_STATUS,r as JUNO_CDN_PROPOSALS_ERROR_CANNOT_SUBMIT,e as JUNO_CDN_PROPOSALS_ERROR_CANNOT_SUBMIT_INVALID_STATUS,T as JUNO_CDN_PROPOSALS_ERROR_EMPTY_ASSETS,s as JUNO_CDN_PROPOSALS_ERROR_EMPTY_CONTENT_CHUNKS,E as JUNO_CDN_PROPOSALS_ERROR_INVALID_HASH,S as JUNO_CDN_PROPOSALS_ERROR_NEXT_ID_CONVERT,p as JUNO_CDN_PROPOSALS_ERROR_NEXT_ID_OVERFLOW,c as JUNO_CDN_PROPOSALS_ERROR_NOT_CONTENT_CHUNKS_AT_INDEX,N as JUNO_CDN_PROPOSALS_ERROR_UNKNOWN_TYPE,u as JUNO_CDN_STORAGE_ERROR_CANNOT_GET_ASSET_UNKNOWN_REFERENCE_ID,l as JUNO_CDN_STORAGE_ERROR_CANNOT_INSERT_ASSET_ENCODING_UNKNOWN_REFERENCE_ID,C as JUNO_CDN_STORAGE_ERROR_CANNOT_INSERT_ASSET_UNKNOWN_REFERENCE_ID,i as JUNO_CDN_STORAGE_ERROR_INVALID_COLLECTION,D as JUNO_CDN_STORAGE_ERROR_INVALID_RELEASES_DESCRIPTION,L as JUNO_CDN_STORAGE_ERROR_INVALID_RELEASES_PATH,d as JUNO_CDN_STORAGE_ERROR_MISSING_RELEASES_DESCRIPTION,U as JUNO_CDN_STORAGE_ERROR_NO_PROPOSAL_FOUND,M as JUNO_COLLECTIONS_ERROR_COLLECTION_NOT_EMPTY,f as JUNO_COLLECTIONS_ERROR_COLLECTION_NOT_FOUND,m as JUNO_COLLECTIONS_ERROR_DELETE_PREFIX_RESERVED,x as JUNO_COLLECTIONS_ERROR_MODIFY_RESERVED_COLLECTION,g as JUNO_COLLECTIONS_ERROR_PREFIX_RESERVED,P as JUNO_COLLECTIONS_ERROR_RATE_CONFIG_ENABLED,J as JUNO_COLLECTIONS_ERROR_RESERVED_COLLECTION,j as JUNO_COLLECTIONS_ERROR_RESERVED_NAME,w as JUNO_DATASTORE_ERROR_CANNOT_READ,H as JUNO_DATASTORE_ERROR_CANNOT_WRITE,O_ as JUNO_DATASTORE_ERROR_USER_CALLER_KEY,R_ as JUNO_DATASTORE_ERROR_USER_CANNOT_UPDATE,t_ as JUNO_DATASTORE_ERROR_USER_INVALID_DATA,n_ as JUNO_DATASTORE_ERROR_USER_KEY_NO_PRINCIPAL,E_ as JUNO_DATASTORE_ERROR_USER_NOT_ALLOWED,N_ as JUNO_DATASTORE_ERROR_USER_USAGE_CHANGE_LIMIT_REACHED,s_ as JUNO_DATASTORE_ERROR_USER_USAGE_INVALID_DATA,l_ as JUNO_ERROR_CANISTER_CREATE_FAILED,U_ as JUNO_ERROR_CANISTER_INSTALL_CODE_FAILED,x_ as JUNO_ERROR_CMC_CALL_CREATE_CANISTER_FAILED,D_ as JUNO_ERROR_CMC_CALL_LEDGER_FAILED,j_ as JUNO_ERROR_CMC_CREATE_CANISTER_FAILED,J_ as JUNO_ERROR_CMC_INSTALL_CODE_FAILED,i_ as JUNO_ERROR_CMC_LEDGER_TRANSFER_FAILED,I_ as JUNO_ERROR_CMC_TOP_UP_FAILED,a_ as JUNO_ERROR_CONTROLLERS_ANONYMOUS_NOT_ALLOWED,T_ as JUNO_ERROR_CONTROLLERS_MAX_NUMBER,A_ as JUNO_ERROR_CONTROLLERS_REVOKED_NOT_ALLOWED,C_ as JUNO_ERROR_CYCLES_DEPOSIT_BALANCE_LOW,u_ as JUNO_ERROR_CYCLES_DEPOSIT_FAILED,P_ as JUNO_ERROR_INVALID_REGEX,p_ as JUNO_ERROR_MEMORY_HEAP_EXCEEDED,S_ as JUNO_ERROR_MEMORY_STABLE_EXCEEDED,F as JUNO_ERROR_NO_TIMESTAMP_PROVIDED,v as JUNO_ERROR_NO_VERSION_PROVIDED,d_ as JUNO_ERROR_SEGMENT_DELETE_FAILED,L_ as JUNO_ERROR_SEGMENT_STOP_FAILED,V as JUNO_ERROR_TIMESTAMP_OUTDATED_OR_FUTURE,h as JUNO_ERROR_VERSION_OUTDATED_OR_FUTURE,$ as JUNO_STORAGE_ERROR_ASSET_MAX_ALLOWED_SIZE,Y as JUNO_STORAGE_ERROR_ASSET_NOT_FOUND,z as JUNO_STORAGE_ERROR_BATCH_NOT_FOUND,K as JUNO_STORAGE_ERROR_CANNOT_COMMIT_BATCH,y as JUNO_STORAGE_ERROR_CANNOT_COMMIT_INVALID_COLLECTION,X as JUNO_STORAGE_ERROR_CANNOT_READ_ASSET,Z as JUNO_STORAGE_ERROR_CHUNK_NOT_FOUND,q as JUNO_STORAGE_ERROR_CHUNK_NOT_INCLUDED_IN_BATCH,Q as JUNO_STORAGE_ERROR_CHUNK_TO_COMMIT_NOT_FOUND,B as JUNO_STORAGE_ERROR_RESERVED_ASSET,k as JUNO_STORAGE_ERROR_SET_NOT_ALLOWED,W as JUNO_STORAGE_ERROR_UPLOAD_NOT_ALLOWED,b as JUNO_STORAGE_ERROR_UPLOAD_PATH_COLLECTION_PREFIX,M_ as isSatelliteError};
//# sourceMappingURL=index.mjs.map